I have an applet that displays a modal JDialog. I need to capture the following two events :
1. The user presses ALT+F4 to close the dialog
-- OR --
2. The user clicks on "x" on the top right corner to close the dialog.
In either case, I need to do processing before the dialog is actually closed.
Please paste a code sample if you have any ideas.