Solved

Terminating an applet.  Simple question

Posted on 2000-02-16
8
238 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example issue 6 46
how to see all occupied ports on windows 10 laptop 15 77
How do I remove an object from a 3 40
ejb on wildfly 5 30
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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:

830 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