title: JFrame always focused
body: <p>I have a Java-application that needs to be brought to the foreground and you have to be able to press keys. </p>
  
  <p>I thought about a timer. It's like you can play a game and press some keys and the timer will count.</p>
  
  <p>I've got this</p>
  
  <pre><code>@Override
  public void focusLost(FocusEvent arg0) {
      System.out.println("Lost");
      TimerFrame.toFront();
      TimerFrame.requestFocus();
  }
  </code></pre>
  
  <p>It's flashing in the taskbar and not focused all the time.</p>