Character Movement

In the game I'm doing, the character can move in six directions by pressing the individual individual arrow keys, or press two at a time for the intermidiate direction. When you're not pressing any keys, the character stays still, facing the direction that he was last traveling. At first I thought to have four booleans, one for each key, and to have an integer that represented the direction for when no keys are pressed. The problem with this is that when you release the keys, you usally don't release them exactly at the same time, so the character will face the direction of the key last pressed. Does anyone know of a better way to do this?

[657 byte] By [JTeen] at [2007-9-27 21:45:20]
# 1
Okay. In the keyReleased(KeyEvent e) method I would have a variable that checked the time between releases, if they are within 50 mm of each other don't record the new direction. if you don't understand I will give a code snippet.
Virum at 2007-7-7 3:44:18 > top of Java-index,Other Topics,Java Game Development...
# 2
Thanks
JTeen at 2007-7-7 3:44:18 > top of Java-index,Other Topics,Java Game Development...