• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

 
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
 
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
 
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
 
I will suppress my every urge. But not this shameless plug:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic