I suggest you can put 4 boolean variables in your program, and in keyPressed method, a boolean variable set true when a corresponding key was pressed, and in keyReleased method, a boolean variable...