title: JDialog with WindowListener - windowClosing not fired
body: <p>I have a class that extends JDialog that have a window listener:</p>
  
  <pre><code>class MyClass extends JDialog {
  
       public MyClass() {
           setDefaultCloseOperation( JDialog.DO_NOTHING_ON_CLOSE );
           addWindowListener( new WindowAdapter() {
  
                  @Override
                  public void windowClosing(WindowEvent e) {
                      System.out.println("closing...");
                      //do something...
                  }
  
              });
       }
  
  }
  </code></pre>
  
  <p>When i click in the X button, nothing happens. And I don't see the print of "closing..." </p>
  
  <p>What I am missing?</p>