Java get mouse position on screen

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
double mouseXPoistion = MouseInfo.getPointerInfo().getLocation().getX();
double mouseYPosition = MouseInfo.getPointerInfo().getLocation().getY();
double mouseXPoistion = MouseInfo.getPointerInfo().getLocation().getX(); double mouseYPosition = MouseInfo.getPointerInfo().getLocation().getY();
double mouseXPoistion = MouseInfo.getPointerInfo().getLocation().getX();
double mouseYPosition = MouseInfo.getPointerInfo().getLocation().getY();