Where do I put that in/how do I do that? Kinda confused
Joined: Mar 22, 2005
Something like "addKeyListener(new keyaction())". You would do that in the init method. The thinkerbox method you should delete entirely. And the keyaction class needs to override one (or more) of the 3 methods it defines, not create a new method. And it must not create a new instance of the portal class.
AWT was superseded by Swing more than 10 years ago. I recommend you change to Swing, which means extending JApplet instead of Applet and gaining a basic understanding of the component hierarchy imposed by the RootPaneContainer interface. Then you can leverage Swing's Key Bindings which afford much more flexibility than a simple KeyListener.
There are no new questions, but there may be new answers.