• Post Reply Bookmark Topic Watch Topic
  • New Topic

close an applet?  RSS feed

 
Madhan Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
i created an applet, i have a close button to close the applet.
But i face exception problems when trying to use System,destroy methods.
so how can i code the close button to close the applet?
guys please help
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

You can't close an applet in the same way you close an application. An applet is embedded in a web page, which you can close by hand (and not necessarily from within the applet). It doesn't make sense anyway, because the JVM will continue to run as part of the web browser, even if the page is closed, so there really is no "exit". For thisreason applets are prohibited from calling System.exit, as you found out.
 
Madhan Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your kind suggestion
 
Species Terminator
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U can use System.exit(0); in applet.And the applets are written in java and has the ability to access the local resources.But normally applets are not allowed this by the sand box of jvm.In order to block it u have to give a signature to the applets.then u r able to do that.
for more results visit http://www.coollinks2others.blogspot.com/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!