press enter in robot java

Solutions on MaxInterview for press enter in robot java by the best coders in the world

showing results for - "press enter in robot java"
Oscar
13 Feb 2020
1 public static void pressEnterKey() {
2		        Robot robot1 = null;
3		        try {
4		            robot1 = new Robot();
5		        } catch (AWTException e) {
6		            // TODO Auto-generated catch block
7		            e.printStackTrace();
8		        }
9		        robot1.keyPress(KeyEvent.VK_ENTER);
10		        robot1.keyRelease(KeyEvent.VK_ENTER);
11		    }
12