title: How to close a modal JDialog when user clicks outside of JDialog?
body: <p>I have a Undecorated Modal JDialog which I want to setVisible(false) when the user clicks outside of the modal dialog.</p>
  
  <p>Is this possible in Swing?</p>
  
  <p>What I am doing is popping up a custom editor for a text field like a date selector.  Is there an easier way to do what I want?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Remember that modal blocks on the call to setVisible(true), so you can't just say "don't use a modal dialog"</p>
  
  <p>And I've tried focus listeners on the dialog, they don't trigger when its modal.</p>