I’m trying to create a keylistener that will only allow alphanumeric input.
I have done this before but cannot remember how.
for some reason getKeyCode() continues to give me 0 regardless of what key is pressed. is this normal? I feel like in the past all i did was use an if statement something like:
if(e.getKeyCode() >= KeyEvent.VK_A && e.getKeyCode() >= KeyEvent.VK_Z)
do something
any ideas?