• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JApplet Problem - HELP

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic