So I have a class that uses a KeyListner
, when various events occur various boolean
become true.
Now this class has a constructor, an instance of this class is called within an JApplet. Now everything works except the Keylistner
.
When the applet is running, the KeyListner
does not respond to any of my actions. However I know that its not a fault in my code because when I put a main method within the class it works fine.
So in summary,
How can I use a KeyListner
...where all its methods are within another class. and this class is constructed within an applet.