?
Solved

Terminating an applet.  Simple question

Posted on 2000-02-16
8
Medium Priority
?
242 Views
Last Modified: 2006-11-17
I have a quick question about applets.  Is it possible to terminate the executions of an applet once a browser has loaded it?  I'm not talking about
the stop() method because that just postpones the applet.  I want the applet to completely terminate.  I've tried using a

System.exit(0);

command but that doesn't seem to work.  Am I using this call wrong or doesn anyone know of anything else I could try?
0
Comment
Question by:CatDevlp00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 1

Accepted Solution

by:
swwong earned 140 total points
ID: 2528125
Are you meaning free the system resources for the applet?

Try

setVisible(false);
dispose(); //Free the system resources
System.exit(0);
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2528134
you can't 'terminate' applet (or browser window). but you can stop all your threads, disable / remove all the UI and stop handling user events.
0
 

Author Comment

by:CatDevlp00
ID: 2528287
swwong,
I mean to terminate the applet, meaning to stop it from running.  Freeing up system resources would also be part of this process.  Is it possible to terminate an applet once it starts running?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:heyhey_
ID: 2528322
what is TERMINATE ?

you can't KILL the browser window
0
 

Author Comment

by:CatDevlp00
ID: 2528470
I don't wish to kill the browser window, I want to kill the applet which is running under the browser window when a certain button is clicked on the applet.
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2528503
just claer all yout UI and STOP RESPONFING.

applet can't be more DEAD than this.
0
 
LVL 1

Expert Comment

by:swwong
ID: 2529754
I do agree with heyhey. If you want to kill an applet, the most simple thing is to kill your browser window. Otherwise, you can just clear up those UIs and free up all the memory resources. And I think it's enough already. Actually, why you want to really "TERMINATE" an applet, and what kind of level for the termination do you want? Please let us know more.
0
 

Author Comment

by:CatDevlp00
ID: 2531345
We're creating a very high level applet which runs an on-line database of sorts.  When a user finishes using the applet, we'd like it to stop running completely, like the end of a program on a single PC.  Thus we wanted complete termination of the applet, as when a PC based program finishes execution.  
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question