An applet's life cycle is controlled by the browser. The four functions 1. init() 2. start() 3. stop() 4. destroy() are called by the browser at various times.init() is, in some sense, like a constructor, and is called when the applet is first loaded. start() is called when the browser starts the applet's execution when the page is first loaded or revisited.stop() is called when the browser stops the execution of the applet. For example, when the user leaves the page or closes the browser.destory() is, in some sense, like a destrutor and called when the applet is unloaded.
1. init()
2. start()
3. stop()
4. destroy()
are called by the browser at various times.init() is, in some sense, like a constructor, and is called when the applet is first loaded. start() is called when the browser starts the applet's execution when the page is first loaded or revisited.stop() is called when the browser stops the execution of the applet. For example, when the user leaves the page or closes the browser.destory() is, in some sense, like a destrutor and called when the applet is unloaded.
init()初始化一次