Umm, you are getting some pretty random helping here. Some people are giving you LWJGL help, for example. And I think using flags, while certainly a way to do it, is unnecessary and non-intuitive.
With regular AWT you can only keep track of one key at a time. However, there is a simple solution: make a LinkedList and add keys as they are pressed, remove them as they are released. KeyTyped is not needed. You can see this is the same general concept as the flag solution, but much less memory is allocated, you can handle every possible key press, and it is completely intuitive. This is how I implement all my AWT games.
LinkedList buttonsPressed = new LinkedList();
public void keyPressed(KeyEvent e)
public void keyReleased(KeyEvent e)
private void processKeys()
for (Iterator i = buttonsPressed.iterator(); i.hasNext();)
int code = ((KeyEvent)i.next()).getKeyCode();
if (code == KeyEvent.VK_UP)
else if (code == KeyEvent.VK_DOWN)
And voila. Does that make sense to you?