Does the component with the KeyListener have focus? Are the KeyListener methods never called at all, or are they called but then the if statements aren't entered?
I recommend creating an MCVE to...
Type: Posts; User: KevinWorkman
Does the component with the KeyListener have focus? Are the KeyListener methods never called at all, or are they called but then the if statements aren't entered?
I recommend creating an MCVE to...
What do you mean when you say you can't get it to work? Does the code compile? Does it run? Does it throw an Exception? Does it result in some strange behavior? Something else?