Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet and Application not running - help!  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to run this program both as an applet and an application, but I'm getting the following error when I try to compile it:

How can I fix this? Below is the code for my program.
-Maria
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


public class calculator extends Applet implements ActionListener{


You say your class implements ActionListener, but you don't have the actionPerformed method. Either add an actionPerformed method to your class or remove "implements ActionListener" from your code
From looking at your code, it look slike you do want an ActionListener, so add the actionPerformed method (see the Javadocs for ActionListsener for more info/details)
Brian
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!