title: Java - Questions about JOptionPane
body: <pre><code>this.addWindowListener(new WindowAdapter()
          {
              @Override
              public void windowClosing(WindowEvent e)
              {
                  int par1 = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit", "Exit?", JOptionPane.YES_NO_OPTION);
                  if(par1==JOptionPane.YES_OPTION)
                  {
                      System.exit(0);
                  }
              }
          });
  </code></pre>
  
  <p>This is my code. How to I set the "No" button in JOptionPane requestFocus? </p>