title: How to bring jinternalframe to front from all opened jinternalframes?
body: <p>This is my source code. 
  I can't get my <code>JInternalframe</code> to the front. 
  I have tried many codes out there, but nothing worked.</p>
  
  <pre><code>    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {                                           
      boolean b = true;
      JInternalFrame[] j = jDesktopPane1.getAllFrames();
      no = new NewOrder();
  
      for (JInternalFrame Ji : j) {
          if (Ji.isShowing()) {
              b = false;
              break;
          }
      }
  
      if (!b) {
        no.requestFocus(true);
      } else {
          dm = jDesktopPane1.getDesktopManager();
          jDesktopPane1.add(no);
          dm.setBoundsForFrame(no, (jDesktopPane1.getWidth() - no.getWidth()) / 2, (jDesktopPane1.getHeight() - no.getHeight()) / 2, no.getWidth(), no.getHeight());
          dm.openFrame(no);
          no.setVisible(true);
      }
  
  
  } 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>NewOrder no = new NewOrder();
  
  if (no.isShowing()) {
      no.toFront();
  } else {
      lo.LoadInterfaces(no, jDesktopPane1);
  }
  </code></pre>
  
  <p>Can any body please explain me why this was happened?
  Thank you!</p>