Query for JFrame.EXIT_ON_CLOSE Permanently deleted user Created May 19, 2005 00:55 Is there any way I can query this event and have it do some clean-up before exit.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Never mind. I had a different problem in my code that was making this necessary. I fixed my problem and this is no longer necessary.
However, if you know how to do it I would still be interested.
- Rex
P.S. Many of you have been very helpful and I really appreciate it.
Rex Winn wrote:
If you want to clean up before exiting, you should set the close
operation to DO_NOTHING and add a WindowListener that does the
appropriate thing when windowClosing() is called.