This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet and Application not running - help!

 
federico elbl
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
 
Brian Pipa
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic