Say, for example, if I have a circle drawn in a JFrame, and I want to paint over it if I hover over it for three seconds.
I've got a MouseMotionListener that tells me the point of the cursor in the JFrame, but so far that's about it.
public void mouseMoved(MouseEvent e)
{
PointerInfo a = MouseInfo.getPointerInfo();
cursorPos = a.getLocation();
SwingUtilities.convertPointFromScreen(cursorPos, e.getComponent());
}
I'm still quite new to action listeners. What should I add if I want to test if the mouse is not moving?
Also, I'm just curious, why is it that MOUSE_MOVED in MouseEvent is considered an int?