Solved

Terminating an applet.  Simple question

Posted on 2000-02-16
8
235 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
 
LVL 16

Expert Comment

by:heyhey_
ID: 2528322
what is TERMINATE ?

you can't KILL the browser window
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now