I small maze game and I got a key Listener. I got it to work.
The problem I have is that i have a text box in the gui and Key Listener is added on to the that. but I want to set it so that when the window is set selected and key pressed , the keypress method to be called.