Hi, I have one problem in Java Swings. I have a one main window which is a frame and that contains three buttons, If I clicked one Button, It has to open a new Jframe window. The other Two buttons are such as Save and Cancel. The new Window also contains two buttons such as Save and Cancel .Now if I click the Esc button from the key Board, It has to close only the new window. But Now It is closing both the windows. how to make difference b/w two windows while clicking ESc button? Advance thanks
[ January 31, 2006: Message edited by: Sathiq Ali ] [ January 31, 2006: Message edited by: Sathiq Ali ]
Normally you'd add KeyListener to the second frame, which listens for the escape key, and closes the window when it's pressed. What does the code do in response to an escape key - post the relevant excerpt of your listener routine.