Im making a program that has to call on a method when space is pressed,note it is the first time I'm doing a keylistener
To do this i did
public void keyPressed (KeyEvent e)
{
int key =e.getKeyCode ();
int space = 32;
if (key==space)
{
}
}
and I get this error
The abstract method "void keyTyped(java.awt.event.KeyEvent $1);", inherited from type "java.awt.event.KeyListener", is not implemented in the non-abstract class "Program".
What am I forgetting?
Btw, I'm using java 1.4.2, as my school currantly doesant want to update program on server