This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes closing an applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "closing an applet" Watch "closing an applet" New topic
Author

closing an applet

Abdul Rahman Hussein
Greenhorn

Joined: Feb 20, 2004
Posts: 2
im currently working on a school assignment that simulates the functioning of a simple calculator.As part of the assignment im supposed to provide a command button to exit from the applet. i went through msdn and i couldnt find a single thing that would resembe what im trying to do.
is it possible? if so how?
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Is this actually an applet running in a web browser, or the applet viewer program? (Do you extend the Applet class?) If so, I'm not certain how to do what you want. However, if you just have your terminology confused and this is a full-blown application, which extends Form or JForm instead of Applet, then you can simply use System.exit() to close the application.
HTH
Layne


Java API Documentation
The Java Tutorial
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, Abdul!
Moving this to the Applet forum...
[ February 23, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: closing an applet