Keylistener not working for JPanel
If you search this problem, you’ll see that it is asked and has been solved many times. KeyListeners need to be on the focused component to work. One solution is to give your component the focus after first making it focusable. Better by a long shot however is to use Key Bindings. Google the tutorial … Read more