Multiple keyboard presses

I am currently working on a multiplayer air hockey game which, if played by two human players from the same computer, requires the two paddles to be controlled from the same keyboard by each player (for instance).

I have created two classes which extend the Behavior class, each controlling each two paddles. processStimulus() is called every time a key is pressed however, no two keys can be pressed at once, so the game is unplayable. Is there a way to allow multiple key presses?

Thanks,

AW

You could use booleans to keep track of which keys are pressed.

thank you,

if anyone has a similar problem, this may come in handy http://www.javaprogrammingforums.com/awt-java-swing/723-help-swing-timer-2-keyevents.html

SOLVED - please close