This is a Swing related question.
I have an ActionListener object called ShutdownActionListener
This action is invoked whenever the user click on File->Exit on the menu.
However, the user can also close the window to quit the application.
In this case, how do I invoke the same code cleanly from WindowListener?