Setting Up Controles

Hello, I’ve been looking all over hte palce to figure out how to use KeyEvent and KeyListener to controle my character. The only problem I have is figuring out if the player used the arrowkeys.

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/KeyEvent.html

Take a look at the “Field Summary”.

a tip for you… dont do your work in the keyEvent itself… have the event set a flag (boolean maybe) that the buttons is pressed and then when your game loop runs check this flag…