How to stop applet from application?

I have a jsf application that has an applet embedded in one of the pages.

When I navigate away from the page then come back, I get an error when the applet tries to reload (device in use error).

What I need to do is dispose the applet when the page changes.

I suspect that I need to add something in the destroy() method for the page, but I do not know how to turn off the applet from within the application.

Any clues as to how I can dispose of the applet?

Or, alternatively, keep it from reloading when navigating back to the page?

[571 byte] By [burferda] at [2007-11-27 6:02:53]
# 1
It appears that the applet is not correctly releasing resources. The correction is to fix this in the applet code.See this tutorial on the lifecycle of applets and how to control them. http://forum.java.sun.com/thread.jspa?threadID=624398&messageID=3791498
ChuckBinga at 2007-7-12 16:44:47 > top of Java-index,Desktop,Core GUI APIs...
# 2
I must be missing something here. The thread you pointed me to was:Determine the Java Class File Major & Minor VersionI didn't see anything relating to life cycles thereMaybe a cut and paste of the appropriate section might help.
burferda at 2007-7-12 16:44:47 > top of Java-index,Desktop,Core GUI APIs...
# 3
Correct link (first few paragraphs): http://java.sun.com/docs/books/tutorial/deployment/applet/index.htmlFurther details are in the section "The Life Cycle of an Applet"
ChuckBinga at 2007-7-12 16:44:47 > top of Java-index,Desktop,Core GUI APIs...