I can't find any Key class, though there is a Key interface related to encryption and security and such. However, I'm guessing (inform me if it's wrong) you want a way to control the airplane using the keyboard. There is a tutorial about using KeyListener here:
[url]http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html[/url]
That should provide all the necessary information.
About drawing images, use drawImage
in the Graphics
class:
[url]http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#drawImage(java.awt.Image,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20java.awt.image.ImageObserver)[/url]
Some optimizations as well as general tips for writing any game are discussed in this tutorial:
[url]http://www.planetalia.com/cursos/Java-Invaders/JAVA-INVADERS-00.tutorial[/url]
Hope that helps.