java robot left click

Solutions on MaxInterview for java robot left click by the best coders in the world

showing results for - "java robot left click"
Beatrice
12 Jan 2020
1public static void click(int x, int y) throws AWTException{
2    Robot bot = new Robot();
3    bot.mouseMove(x, y);    
4    bot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
5    bot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
6}
7