Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applets running out of a browser!!

 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
my applet currently runs in a browser but i want to make it so it runs out of the browser when its uploaded so it looks like an application on its own...
what do i have to add to my applet to achieve this.. thanx
 
Angela Lamb
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a main method to your class that calls the functions you used to initialize the applet.
public static void main(String[] args)
{
init();
start(); // only needed if your applet overrides this method
}

[This message has been edited by Angela Ann (edited June 08, 2001).]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you are going to need somewhere to display your applet, too...



This code will work for the majority of Applets... however, if your applet uses parameters, you are going to have to find a different way to set them, and some Applet specific methods will not work as an application ( getImage() to name one... you have to use Toolkit.getDefaultToolkit().getImage() to get an Image in an application... ).

HTH,
-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic