The moose likes Applets and the fly likes Significance of Start() and Stop() methods Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Significance of Start() and Stop() methods" Watch "Significance of Start() and Stop() methods" New topic
Author

Significance of Start() and Stop() methods

Indira Devi
Ranch Hand

Joined: Feb 07, 2001
Posts: 30
Hello
Can anyone please tell me about the start() and stop() methods when we have init() and destroy()?
Thanks in advance
Indira.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

Indira,
Here is an illustration...
Applet first called by browser ---------------- init()
-------------------------------------------- start()
Browser leaves Applet's page ------------------ stop()
Browser returns to Applet's page -------------- start()
Browser leaves Applet's page ------------------ stop()
Browser exits --------------------------------- destroy()
Start() and Stop() are for when the browser enters and exits the page. Init() and Destroy() are constructor and destructor. One major use I have seen for Start() and Stop() are for controlling threads that the applet uses... you don't want multiple threads taking up memory in the background of the browser...
HTH,
-Nate
[This message has been edited by Nathan Pruett (edited March 13, 2001).]


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
 
subject: Significance of Start() and Stop() methods
 
Threads others viewed
stop() and start() ??
Threads
directly stopping a thread
Updating deployed EJB's
applet started by a browser
developer file tools