title: JOptionPane YES NO OPTION
body: <p>I got an JOptionPane and yes and no buttons. But, whichever button  you click it still exists. HELP! Heres the code:</p>
  
  <pre><code>int dialogButton = JOptionPane.YES_NO_OPTION;
              JOptionPane.showConfirmDialog (null, "Are you sure?","WARNING", dialogButton);
              if(dialogButton == JOptionPane.YES_OPTION) {
                  System.exit(0);
              if(dialogButton == JOptionPane.NO_OPTION) {
                    remove(dialogButton);
                  }
                }
  </code></pre>