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 JApplet Problem - HELP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "JApplet Problem - HELP" Watch "JApplet Problem - HELP" New topic
Author

JApplet Problem - HELP

federico elbl
Greenhorn

Joined: Oct 14, 2003
Posts: 13
Hi everybody,
I'm trying to make this calculator program work as an applet AND as an application. I tried using:

in many different ways, but it didn't work. Can sombody help me make it work?
Below is the source code for my calculator program.
Thanks in advance,
-Fede
ps-You can also e-mail me at laurare@rocketmail.com
Shashi Kanta
Ranch Hand

Joined: May 08, 2002
Posts: 89
Remove the main method from your current class i.e. calcg and put it in a JApplet class
Have a JApplet class
[code]
public class CalJApplet exten
Shashi Kanta
Ranch Hand

Joined: May 08, 2002
Posts: 89
Remove the main method from your current class i.e. calcg and put it in a JApplet class
Have a JApplet class
[code]
public class CalJApplet exten
Shashi Kanta
Ranch Hand

Joined: May 08, 2002
Posts: 89
oops! the message got truncated.
here it is again.
remove the main method from the calcg class, and put in a JApplet subclass.
Also, create the instance of the calcg class in the init() method of the JApplet.
e.g.
public class CalJApplet extends JApplet{

public void init(){
//create the instance of calcg
}
public static void main(String args[]){
//create the instance of calcg
}
}
-Shashi
 
wood burning stoves
 
subject: JApplet Problem - HELP
 
Similar Threads
calculator program help please
advanced calculator
divide by 0 exception
URGENT Help With Scientific Calculator!
problem with writing calculator application