title: Get the return value of JOptionPane
body: <p>My JOptionPane code is as follows:</p>
  
  <pre><code>selectedSiteName = JOptionPane.showInputDialog("Enter the name of the new site:");
  </code></pre>
  
  <p>This renders out an input with a textbox and an OK and Cancel button. I need to detect if Cancel was clicked.</p>
  
  <p>Cheers.</p>