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

 
ashok r
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you pls send the code for closing the applet when pressing a button.
i tried using System.exit(0);
but it is not working

[Removed Email Address from Post. UseTheForumNotEmail - Gregg Bolinger]
[ September 15, 2005: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ashok rao rules

Welcome to Javaranch. I'd like to ask you to read our Naming Policy and adjust your display name accordingly. You can do so by clicking here. Simply removing the word "rules" from your display name should suffice.

Next, please read through our FAQ on HowToAskQuestionsOnJavaRanch.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And last but not least, this belongs in our Applets forum. So I will move it there.
[ September 15, 2005: Message edited by: Gregg Bolinger ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will fail for two reasons.

Firstly, the security manager associated with applets does not allow you to call System.exit, unless the applet is signed.

Secondly, what do you actually want to do? The applet is part of a web page; do you want that to close that page when you click the button? Or does the applet open a window which you would like to disappear? That window you can close, but then there's still the applet running in the web page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic