title: How to do action when closing the frame?
body: <p>How do I do action when I'm going to terminates the programme.</p>
  
  <p>For example :</p>
  
  <p>When I'm going to terminates the programme, I want to set</p>
  
  <pre><code>if( the x button is clicked or something )
  deleteRow from database;
  else
  just end.
  </code></pre>
  
  <p>Is it should be done inside the ui frame ?</p>