title: Create custom operation for setDefaultCloseOperation?
body: <p>I want to make my Java Application to call my own custom made function when the "close" cross button is pressed. as far as i see there may be no way since <code>setDefaultCloseOperation</code> has no overloads at all.  </p>
  
  <p>Any idea how this can be achieved? </p>