Hello all,
My application catches ESCAPE keypresses and closes the current internal frame in such a situation.
Dialogs (as popped up from JOptionPane) are problematic in that I have not been able to catch the ESCAPE event in the dialog, and it ends up propagating to the internal frame, thus both the dialog and the internal frame are closed.
I have tried creating a JOptionPane instance (as opposed to using its convenience methods) and getting a dialog from it with createDialog(), and adding a key listener to the dialog catches most keypresses EXCEPT escape!!!! Not fair!!!! How can I get that event and consume it in the dialog???
My application catches ESCAPE keypresses and closes the current internal frame in such a situation.
Dialogs (as popped up from JOptionPane) are problematic in that I have not been able to catch the ESCAPE event in the dialog, and it ends up propagating to the internal frame, thus both the dialog and the internal frame are closed.
I have tried creating a JOptionPane instance (as opposed to using its convenience methods) and getting a dialog from it with createDialog(), and adding a key listener to the dialog catches most keypresses EXCEPT escape!!!! Not fair!!!! How can I get that event and consume it in the dialog???