Is there a way to implement a KeyListener and MouseListener in the same applet? I already tried any ways I thought that would work and I tried Google. :\
my try:
C:\Users\Dan\Documents\DanJavaGen\tileGen.java:23: tileGen is not abstract and does not override abstract method mouseExited(java.awt.event.MouseEvent) in java.awt.event.MouseListener
public class tileGen extends JApplet implements KeyListener, MouseListener {
^
1 error
You can certainly implement both KeyListener and MouseListener in the same applet 🙂
You must have the following methods in the tileGen class:
If you already have some of these methods implemented you can leave them out.
Gentle hint: Capitalize your class name as TileGen 🙂 Lower-case class names are — by convention — used only for generated or internal code.