I have a JFrame with 1 panel for drawing and set KyeListener for JFrame. It works fine unless I add JTextArea or JTextPane. Looks like it stops responding at all. I need some option to display the text and use keylistener for animation. I don’t need anything to type, I just want my keylistener working all the time. I need something better than JLabel, I want some formatting.
Share
KeyListener isn’t designated for listening
KeyEventscame from keyboard to the Swing GUI,because KeyListener required focusable
JComponent, you have to set forsetFocusable()or programatically moving withFocusFocus / Focus SubSystemis asynchonoususe KeyBindings rather that bothering with Focus / Focus SubSystem