title: How to bring a window to the front?
body: <p>We have a Java application that needs to be brought to the foreground when a telecontrol mechanism activates something in the application.</p>
  
  <p>In order to get this, we have realized in the called method of the class which represents the frame of our application (extension of a <code>JFrame</code>) following implementation:</p>
  
  <pre><code>setVisible(true);
  toFront();
  </code></pre>
  
  <p>Under Windows XP, this works the first time it is called, on the second time only the tab in the taskbar flashes, the frame doesn't come to the front anymore. Same goes for Win2k. On Vista it seems to work fine.</p>
  
  <p>Do you have any ideas?</p>