Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JApplet Problem - HELP

 
federico elbl
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic