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

Trying to exit the Applet, but... please take a look

 
Martha Yeh
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello experts
please take a look about this part:
public void actionPerformed(ActionEvent e){}
I am trying to exit the Applet after type "quit" but not allow me to do that, there must be some wrong...
could you help me out?
thanks.
martha
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martha,
I don't think you can control when your applet quits. The browser and therefore the user is in control of that.
Usually if you want to have something appear and then disappear after something happens you use JDialogs or JFrames. Then you can hide them or show them accordingly.
Regards,
Manfred.
 
Martha Yeh
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Manfred,
yeah, i know. i tried System.exit(); and stop(); and destory();... man.. its just not work out that way i want.
ok, i guess i need to add the button "exit" or "quit" would be
easier than this??!!
thanks very much and good weekend
martha
 
Abhinav Sharma
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi martha,
Hey martha. You cannot use System.exit() in Applets. That is only possible in frames. In order to use System.Exit() in Applets you have to use policytools. It gives applet permission to work like frames. But while in browser you cannot use System.exit(). You can use System.exit() only when you view applet in appletviewer. I think you can use policytool in this. I hope this solves your problem
abhinav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic