I wanna implement the Escape key event for all the dialog boxes in my applet. I have given the key event listener on all the dialogs wherein if the key code is VK_ESCAPE then I dispose that particular dialog.
This works fine for some dialogs, also fine for dialogs which have text fields & text areas on it & these components having the focus. But the problem is for dialogs having JTables on it. If the focus is on the table then esc key doesnt work for the dialog. Even for the combo boxes as conbo boxes do not have key event handlers.
But I need to fix this problem for dialogs containing tables.
Can anyone plz suggest me a solution for this problem.