theotherguy
Newbie
- Joined
- Jul 5, 2003
- Messages
- 5,107
- Reaction score
- 1
Okay, this has absolutley nothing to do with modding, just a general coding question.
Can anyone tell me/point me to a good tutorial on how to add keyboard input to a java application? All of the tutorials I've found have to do with applets or require me to go through complicated and tedious steps which involve downloading outside software.
I know that Java AWT has a keyboard event handler called KeyPressed, and that you're supposed to override the method inside your program, but it also requires me to make a keyboard listener, and that's where I get stuck. I can't define a new keyboard listener because it's static and I can't use the method which extracts a keyboard listener from my window component because the compiler says that the method does not exist.
please help!
thanks.
Can anyone tell me/point me to a good tutorial on how to add keyboard input to a java application? All of the tutorials I've found have to do with applets or require me to go through complicated and tedious steps which involve downloading outside software.
I know that Java AWT has a keyboard event handler called KeyPressed, and that you're supposed to override the method inside your program, but it also requires me to make a keyboard listener, and that's where I get stuck. I can't define a new keyboard listener because it's static and I can't use the method which extracts a keyboard listener from my window component because the compiler says that the method does not exist.
please help!
thanks.