One more question...why is there a delay in keyPressed() when rotating? The method fires once imidiatly, then there is a delay. and then it fires again, after that its smooth.

That's the key auto-repeat. Open up Notepad (or whatever) and hold down a key. You'll see the same effect.

To get around it, implement both keyPressed() and keyReleased() to set and clear flags for the keys you are interested in. Don't assume that keyPressed() means that the key is being held down - it doesn't work like that.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org