This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get the destroy() functionality of an Applet in browser

 
Raukutam Sandeep
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to notice that the applet has been destroyed, while the browser window is opened?
I have a button in a applet window, and if I write System.exit(0) in its actionperformed method, will it work?
I wrote destroy() in the button's actionperformed method, but i'm unable notice any change in the applet's state.
Please throw some light on this.
regds,
Sandeep
 
Sandeep Jain
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well,
use the following code and enable the java console in the web browser . you can see the destroy method being called moment the applet is removed from the memory ie u go to some other site.public void destroy()
{
System.out.println("window destroy");
}

------------------
Sandeep Jain
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic