I've created an Action class "ExitAction" which is added to a JMenuItem.
So, when user click on File->Exit, the program exits as expected.
However, if the user click on "X" on the upper corner, ExitAction is
not called.
How do I go about associating ExitAction with JFrame??
I've implemented a MyWindowListener, but I can't seem to invoke
ExitAction from there.