title: Java - Only dispose JFrame on close?
body: <p>In my Java program I would like that, regardless of any other windows being open, whenever the user clicks the red X in the corner, <strong>just that</strong> swing frame closes. I experimented with JFrame.DISPOSE_ON_CLOSE and other window listeners, but when I exit one JFrame the system still exited. </p>
  
  <p>To clarify, suppose I have two JFrames visible, exiting one automatically exits the other, and the system exits. Any ideas as to how to only close one JFrame? Thanks.</p>