title: bring JInternalFrame to the front
body: <p>I have a <code>JDesktopPane</code> which contains a number of <code>JInternalFrame</code>s. I'd like to be able to bring any <code>JInternalFrame</code> to the front, overlaying any other active frames. I found a number of code samples to do this, but none seem to work - the frame does NOT go on top of other active <code>JInternalFrame</code>s. E.g.</p>
  
  <pre>
  public static void moveToFront(final JInternalFrame fr) {
          if (fr != null) {
              processOnSwingEventThread(new Runnable() {
                  public void run() {
                      fr.moveToFront();
                      fr.setVisible(true);
                      try {
                          fr.setSelected(true);
                          if (fr.isIcon()) {
                              fr.setIcon(false);
                          }
                          fr.setSelected(true);
                      } catch (PropertyVetoException ex) {
                          ex.printStackTrace();
                      }
                      fr.requestFocus();
                      fr.toFront();
                  }
              });
          }
      }
  </pre>