how do I use key class?

hey,So, I am making this airplane game for my Computer Science class, and I come across that I need to use the key class. I never really learn anything about the Key class and also how to load a image from my computer on to the JAVA applet? Thanks a lot if you can help me.
[287 byte] By [xcc19891SLACa] at [2007-10-2 19:59:01]
# 1

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.

xplodesa at 2007-7-13 22:38:31 > top of Java-index,Other Topics,Java Game Development...