The Artima Developer Community
Sponsored Link

Java Answers Forum
Applet destroying

1 reply on 1 page. Most recent reply: Dec 3, 2002 5:36 AM by Peter Norell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Amit

Posts: 23
Nickname: amitactsh
Registered: Nov, 2002

Applet destroying Posted: Dec 2, 2002 1:06 AM
Reply to this message Reply
Advertisement
Hello friends ;
I am working with applets and I am stucked in a problem that I am unable to close the applet manually. I have created on button and on the click of that button I called stop() and destroy() function of that applet the fuction are get called but the applet is not disposed.
Please help me.
Thanks in advance.
Amit


Peter Norell

Posts: 5
Nickname: bithir
Registered: Dec, 2002

Re: Applet destroying Posted: Dec 3, 2002 5:36 AM
Reply to this message Reply
Applets have a well defined life-cycle that is out-of-scope for the applet developer.

These methods include, but are not limited to:
public void init()
public void start()
public void stop()
public void destroy()


As applets are instantiated and run by an applet-container, these method are called by the applet-container. That means you do not call them yourself, but the applet containers calls them aproperiatly. For instance, when the user leaves the page where the applet is running, the applet-container will call destroy() in your applet, allowing you to do some clean-up before it will dereference your applet.

Regards,
Peter Norell

Flat View: This topic has 1 reply on 1 page
Topic: cannot resolve symbol: variable Previous Topic   Next Topic Topic: Sun Certification

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use