title: Java: How do I close a JFrame while opening another one?
body: <p>My program starts with a picture with a textfield in a JFrame. I want when the user types start it closes the picture JFrame and opens another JFrame with the main program. I've tried</p>
  
  <p><code>processEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));</code></p>
  
  <p>on the Image frame but it closes all the windows. </p>