Applets do not have a main() method how come they work ?
Joined: Feb 06, 2001
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application. We write an applet by making it a subclass of the Applet class. The class overrides four Applet methods so that it can respond to major events: init() To initialize the applet each time it's loaded (or reloaded). start() To start the applet's execution, such as when the applet's loaded or when the user revisits a page that contains the applet. stop() To stop the applet's execution, such as when the user leaves the applet's page or quits the browser. destroy() To perform a final cleanup in preparation for unloading.
Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Joined: Sep 29, 2000
If you are running an Applet the BROWSER is actually the program that is running and it was probably not written in java. The four methods that Applets use are a "contract" or agreement between java and the browser so that you can give the browser instructions on how to start, maintain and close down your Applet.
"JavaRanch, where the deer and the Certified play" - David O'Meara