File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 agree. Here's the link:
subject: Applet and Application not running - help!
It's not a secret anymore!