title: JoptionPane ShowConfirmDialog
body: <p>I have a Java program. When I run the program, it will give me a GUI which as I attached. </p>
  
  <p>When I want to close it, it will prompt out a confirm dialog. If I press the Yes button, it will quit the program using <code>System.exit()</code>. </p>
  
  <pre><code>public static void main(String args[])
  {
      ButtonTest app = new ButtonTest( );
      app.addWindowListener( 
          new WindowAdapter( )
          {
              public void windowClosing (WindowEvent e)
              {
                  String message = " Really Quit ? ";
                  String title = "Quit";
                  int reply = JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION);
                  if (reply == JOptionPane.YES_OPTION)
                  {
                      System.exit(0);
                  }
  
              }
          }
      );
  }
  </code></pre>
  
  <p>If I don't want to quit the program, what can I do? <code>System.continued()</code> ?</p>