i used to have a bad habit of not looking at the ball during my swing/at contact. i do everything right, but look away to where i want to hit the ball at the last moment. bad habit.
i focus on the ball in detail: what kind of spin is on it, where on it's surface i'm going to hit it and i try to feel the ball against my racquet at contact as i swing through/across/up/down on it. sometimes i try to read "US Open" or whatever is written on it.
focusing on the details of the incoming ball ensures that i'm looking at it as i approach it and during contact. it also forces me to make up my mind beforehand about where on the court i'm going to hit it.
Disclaimer: I'm NOT a coach...
Real tennis: https://www.youtube.com/watch?v=yDqnkLJ9BtM