title: how to close an instance of jframe
body: <p>In my code i generate some images and display them every image in a jframe, but when i close on the jframes i found all the other closes as well. I want when i close one of the jframes, the others remain.</p>
  
  <p>how can i do that.</p>
  
  <p><strong>code</strong>:</p>
  
  <pre><code>private static void initJFrame(String caption) {
      // TODO Auto-generated method stub
      if (caption.isEmpty() || caption.equals("")) {
          caption = SysConsts.DEFAULT_JFRAME_CAPTION;
      }
  
      JFrame mediaFrame = new JFrame(caption);
      mediaFrame .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      mediaFrame.setSize(SysConsts.DEFAULT_JFRAME_WIDTH, SysConsts.DEFAULT_JFRAME_HEIGHT);
      facePanel = new FacePanel();
      mediaFrame.setContentPane(facePanel);
      mediaFrame.setVisible(true);
      mediaFrame.validate();
  }
  </code></pre>
  
  <p><strong>@Hovercraft Full Of Eels: your suggestion does not answer my question *</strong></p>