title: java swing close window without exiting app
body: <p>I have a little frame where I ask user &amp; password. This frame will be opened clicking over a button in a main window.</p>
  
  <p>Then I have two buttons: ok and cancel.</p>
  
  <p>When I click on "cancel" button, I need to close this frame without exiting the app.</p>
  
  <p>How can I do that?</p>