How to use mouse location?
Posted: Fri Mar 05, 2021 11:30 am
Hi
I should be able to use:
Point p = MouseInfo.getPointerInfo().getLocation();
and then p.x or p.y to get the mouse coordinate on screen...
If I test this and feed the p.x value into a counter for instance or use the value on a string it doesn't show anything actually...
Any suggestions on what I'm doing wrong?
cheers Hans
I should be able to use:
Point p = MouseInfo.getPointerInfo().getLocation();
and then p.x or p.y to get the mouse coordinate on screen...
If I test this and feed the p.x value into a counter for instance or use the value on a string it doesn't show anything actually...
Any suggestions on what I'm doing wrong?
cheers Hans