Ping Pang Pong Pung

Im new to java, although i have experience in c++ and vb

But im trying to build a simple game

But i am not sure how the heck to include the keylistener class

I already have all the code necessary i.e. addKeyListener(this) etc..

but im supposed to add "implements keylistener" right?

but how do i do that if i already have:

public class madPong extends Applet implements Runnable {

i tried adding ", KeyListener" "and KeyListener" "with KeyListener"

am i supposed to have only one implementation?

Thanks in advance ;)

[577 byte] By [MadGamer] at [2007-9-27 21:03:38]
# 1

public class yourClass extends whatever implements Runnable, KeyListener {

// code...

}

Woogley at 2007-7-7 2:45:40 > top of Java-index,Other Topics,Java Game Development...
# 2
:-\ well i tried that and it said:cannot resolve symbol 'KeyListener'public class madPong extends Applet implements Runnable, ^KeyListener {i have these imports:import java.applet.*;import java.awt.*;
MadGamer at 2007-7-7 2:45:40 > top of Java-index,Other Topics,Java Game Development...
# 3
You have to import:import java.awt.event.*;
Virum at 2007-7-7 2:45:40 > top of Java-index,Other Topics,Java Game Development...
# 4
oh!:p thanks a million
MadGamer at 2007-7-7 2:45:40 > top of Java-index,Other Topics,Java Game Development...
# 5
Any time. :)
Virum at 2007-7-7 2:45:40 > top of Java-index,Other Topics,Java Game Development...
# 6
whoops, I didn't read the whole question :P. *doh*
Woogley at 2007-7-7 2:45:40 > top of Java-index,Other Topics,Java Game Development...