posted 18 years ago
you could add a windowListener (for windowClosing) and
1) include a button.doClick(); or
2) put the code from the actionPerformed() into a separate method, and
have this called from both actionPerformed() and windowClosing()
something like this
(my preference would always be for (2))