This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet and Application not running - help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Applets
Bookmark "Applet and Application not running - help!" Watch "Applet and Application not running - help!" New topic

Applet and Application not running - help!

federico elbl

Joined: Oct 14, 2003
Posts: 13
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.
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299

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)

My Java Freeware:<br />MACCC - <a href="" target="_blank" rel="nofollow"></a><br />Nator - <a href="" target="_blank" rel="nofollow"></a>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Applet and Application not running - help!
jQuery in Action, 3rd edition