title: How to only get my Pop-up JFrame to close
body: <p>I have created two classes. One is my main GUI the other is my popup GUI which is launced via a button click.</p>
  
  <p>How ever when i click the close button on my popup GUI it closes all the JFrames.</p>
  
  <p>Here is my main GUI </p>
  
  <pre><code>public FirstAid() {
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setBounds(100, 100, 700, 507);
  contentPane = new JPanel();
  contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  setContentPane(contentPane);
  contentPane.setLayout(new BorderLayout(0, 0));
  </code></pre>
  
  <p>My popup GUI also has the </p>
  
  <pre><code>EXIT_ON_CLOSE
  </code></pre>