Robot rbt= new Robot();
// Create object of
Robot class
rbt.keyPress(KeyEvent.VK_ENTER); // Press Enter
rbt.keyRelease(KeyEvent.VK_ENTER); // Release Enter
rbt.keyPress(KeyEvent.VK_ENTER); // Press Enter
rbt.keyRelease(KeyEvent.VK_ENTER); // Release Enter