Robot.mouseMove & Mouse-Motion Listener problem
843807Jun 13 2010 — edited Jun 23 2010
Here is my problem :
I am using a Mouse-Motion Listener. Thanks to this listener, I can catch the movements of the mouse. I have implemented the mouseMoved(MouseEvent e) function.
I am using, in my function mouseMoved(MouseEvent e), a Robot (java.awt.Robot) object. I use the method mouseMove(int x, int y) of this object to replace the pointer of the mouse (it's the general purpose of my program).
My problem is that this movement created by mouseMove(int x, int y) is handled as a normal mouse event by the function mouseMoved(MouseEvent e) so these two functions start an infinite loop.
Do you know how I can proceed to avoid this infinite loop ?
Thank you for your help,