OK so my applet is not compiling and I Googled some answers and none worked. (Such as taking public out of public class)…
Here’s my code: http://www.so.pastebin.com/MBjZGneg
Heere is my error:
C:\Users\Dan\Documents\DanJavaGen\Inventory.java:12: Inventory is not abstract and does not override abstract method keyReleased(java.awt.event.KeyEvent) in java.awt.event.KeyListener
public class Inventory extends Applet implements KeyListener {
… help? 🙂 please.
It means what it says. You are not implementing the keyReleased method. You’re also not implementing keyTyped. If you want to keep your current class structure, you can add empty methods:
If you put the listener in a separate (possibly inner) class, you could extend KeyAdapter, which provides these empty methods for you.