File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet and Application not running - help!" Watch "Applet and Application not running - help!" New topic
Author

Applet and Application not running - help!

federico elbl
Greenhorn

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.
-Maria
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)
Brian


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Applet and Application not running - help!
 
Similar Threads
GridBagConstraints
read input from text file
what each part of this program does
help with button display
problem with program