title: how do i close a frame yet open a new frame?
body: <p>how do i close a frame yet open a new frame?</p>
  
  <p>i have a frame, (help)</p>
  
  <p>when i click on my menu item 
  i want to open (mainForm)
  exit from help.</p>
  
  <p><code>new mainForm().setVisible(true);
  System.exit(0);</code></p>
  
  <p>i know this closes the whole program however how do i get it to only close the current frame</p>
  
  <p>thanks</p>