-1
I have a Jframe implemented in a simple way with Mousemotionlistener in java to get the coordinates of a variable, and I am returning with gety() and getx(). So far so good, but when I noticed the coordinates shown in the Jframe, are exactly the coordinates from inside the Jframe, when the mouse exceeds the edges of the window the coordinates are no longer rewritten. What procedure or class or medium, that in Java, allows me to "listen outside the frame" the movement of the mouse cursor ?
Provide a [mcve] so that we can help you.
– user28595
This is the method I used to catch the movement inside Jframe: Override public void mouseMoved(Mouseevent e) { posicaY.setText(Integer.toString(e.gety())); posicaoX.setText(Integer.toString(e.getx()); }
– Rivaldo dos santos