title: Alt+Tab using Java Robot
body: <p>I am trying to bring up the <strong><kbd>alt</kbd>+<kbd>tab</kbd></strong> menu with a Java Robot. When I call the alt_tab() method, I want to bring up the <strong><kbd>alt</kbd>+<kbd>tab</kbd></strong> menu and keep the menu up. I know this can be achieved using <strong><kbd>alt</kbd>+<kbd>ctrl</kbd>+<kbd>tab</kbd></strong>. </p>
  
  <p>So far I have tried the code below, and also just <strong><kbd>alt</kbd>+<kbd>tab</kbd></strong> without the control key. I am not sure why it's not bringing up the menu. All it does is emulate pressing the alt key. </p>
  
  <pre><code>public void alt_tab() {
      Robot robot = new Robot();
      robot.keyPress(KeyEvent.VK_ALT);
      robot.keyPress(KeyEvent.VK_CONTROL);
      robot.keyPress(KeyEvent.VK_TAB);
      robot.delay(100);
      robot.keyRelease(KeyEvent.VK_TAB);
      robot.keyRelease(KeyEvent.VK_CONTROL);
      robot.keyRelease(KeyEvent.VK_ALT);
  }
  </code></pre>
  
  <p>I am using Windows 8 Pro and JDK 7. Any help is appreciated! </p>