title: Get the application closing event
body: <p>How to get to the application closing event? </p>
  
  <p>I want to get application to save all unsaved operations or show the user a message "Are you sure about closing without saving all data?" something like this. </p>
  
  <p>If this will be helpful - the application is a <code>SingleFrameAplication</code> using Swing.</p>