title: Execute code on window close in GWT
body: <p>I'd like to do something like this: </p>
  
  <pre><code>Window.addWindowClosingHandler(new Window.ClosingHandler() {
  
      @Override
      public void onWindowClosing(ClosingEvent event) {
          event.setMessage("Really?");
  
          // If user clicks 'ok' in the dialog, execute code below. Else skip the code and return to window.
  
          // CODE that does stuff goes here.
      }
  });
  </code></pre>
  
  <p>How do I capture the input from the dialog?</p>