title: Application exits on closing of Jframe in java swing in netbeans 7.0
body: <p>i am actually developing GUI application whwn i run this application a login window comes
  i have a button on it when after successful login  i have MDI application form i have menu in that 
  in menu i have menu items when i click menu items Jframe opens upto here i am haing no problem</p>
  
  <p>but when i close Jframe form entire application exits </p>
  
  <p>LOGIN FORM Code</p>
  
  <hr>
  
  <pre><code>public static void main(String args[]) {
          java.awt.EventQueue.invokeLater(new Runnable() {
  
              public void run() {
                  new Login().setVisible(true);
              }
          });
  </code></pre>
  
  <p>BUTTON CODE</p>
  
  <pre><code> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
          // TODO add your handling code here:
           NewMDIApplication n = new NewMDIApplication();
           n.show();
           this.setVisible(false);
  
  
      }  
  </code></pre>
  
  <hr>
  
  <h2>MDIApplication form code</h2>
  
  <pre><code>private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
          // TODO add your handling code here:
          IVITEM i = new IVITEM();---- this is that form that opens inside the MDI appliaction
          i.show();
      }      
  </code></pre>
  
  <hr>