Solved

Terminating an applet.  Simple question

Posted on 2000-02-16
8
237 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 1

Accepted Solution

by:
swwong earned 70 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 78
mockito example issue 8 73
Error in @AspectJ Based AOP with Spring 2 13
maven module vs maven project 3 23
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

803 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