I've run into yet another tricky problem.
While the user's mouse is over a certain panel I have on my GUI, I want the panel to outline a circle around the user's mouse. I'm already using a Swing Timer to control the movement of existing objects drawn on the panel, and I've overridden the panel's paintComponent(Graphics g) method, so I thought I'd just add a little if-statement to that paintComponent(Graphics g) method so that it also checks to see if the mouse is over the panel.
I'd also need to know how to get the mouse's position with respect to the JPanel that is drawing the circle around the mouse...
However, I'm not finding any fast ways to do this... Can anyone point (heh, mouse pointer <---awful pun) me in the right direction?