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