Java keyDown help

i am currently making a 2 player applet pong game in java.I used the keyDown is what the code look like

public boolean keyDown(Event e,int key)
if(key == Event.UP)
//player1 move up
if(key== Event.DOWN)
//player1 move down
if(key == 53)
//player2 move up
if(key == 50)
//player2 move down
but the problem is that it only work with 1 key at a if player 1 is moving,player 2 can not move,and while player 2 is moving,player 1 cannot there a way to make 2 or more key pressing at the same time?