C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is an Applet? and what are the lifecycle methods for it?

+1 vote
4,310 views
asked May 14, 2014 by augustaina Sr Member (4,820 points)

1 Answer

0 votes

 An applet is a java program which register on the server and will be executed in the client.

*Life cycle methods:

1. int(): This is the 1st method to be executed this method contains the code for initialization. This method will be executed only one time.

2. start(): This method will be executed after init() method. This method contains business logic like connecting to files data bases processing the data, generating report etc. this method will be executed multiple times as long as the applet has the control.

3. stop(): This method will be executed when the applet looses the control. This method contains a logic for the performing “cleanup activities”. This method will be executed multiple times when ever the applet looses the control.

4. destroy(): This is the last method to be executed before terminating the applet. This method is used to destroy the applet. This method executed only one time.

Note: when even destroy() method is called before invoking it will call stop() method.

answered May 14, 2014 by rock Expert (14,990 points)

Related questions

0 votes
1 answer 46 views
46 views asked Jan 3, 2014 by smith Geek (15,340 points)
0 votes
1 answer 22 views
22 views asked May 6, 2014 by felin Advisor (8,400 points)
0 votes
1 answer 51 views
51 views asked Apr 25, 2014 by taye Sr Member (4,970 points)
0 votes
1 answer 120 views
0 votes
1 answer 27 views
27 views asked Jan 9, 2014 by smith Geek (15,340 points)
...