Applets life cycle


Applet life cycle means the various states through which applet passes during its object creation and removal. Each state is a method. There are total five states (methods), which are shown as :

These methods are called automatically.

init(), start(), stop(), destroy() methods are defined in java.applet.Applet class. paint() method is defined in java.awt.Component class, an indirect superclass of Applet.

init(): The applet starts here. In this method, the applet object is created by the browser, but objects are in inactive states.
This method is suitable to,
Initialize variables, instantiate objects, and colors in GUI etc.
start(): To make the applet object active, the init() method calls start() method, which makes applet active for processor time.

paint(): This method belongs to java.awt.Graphics, which includes many methods of drawing necessary to draw on the applet window. In this method programmer can write his code of what he expects from applet like animation etc. This is similar to runnable state of thread.

stop(): In this method the applet becomes temporarily inactive. An applet can come any number of times into this method in its life cycle and can go back to the active state (paint()).It is similar to the blocked state of the thread.

destroy(): This method is called to end of the life cycle of an applet. It is similar to the dead state of the thread.


init(): Browser called this method at the time of starting the execution. This is called only once in the life cycle.

start(): This method is called by the init() method, a number of times in the life cycle , to make the applet active.

paint(): This  method is called by the start() method, number of times in the execution.

stop(): This method is called to inactivate the applet. This method is called number of times in the execution.

destroy(): This method is called to close the applet, called only once in the life cycle.

Python Programming ↓ 👆
Java Programming ↓ 👆
JAVA covered following topics in these notes.
JAVA Programs
Principles of Programming Languages ↓ 👆
Principles of Programming Languages covered following topics in these notes.

Previous years solved papers:
A list of Video lectures References:
  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

    Computer Organization and Architecture ↓ 👆

    Computer Organization and Architecture covered following topics in these notes.

    1. Structure of desktop computers
    2. Logic gates
    3. Register organization
    4. Bus structure
    5. Addressing modes
    6. Register transfer language
    7. Direct mapping numericals
    8. Register in Assembly Language Programming
    9. Arrays in Assembly Language Programming


    1. William stalling ,“Computer Architecture and Organization” PHI
    2. Morris Mano , “Computer System Organization ”PHI

    Computer Network ↓ 👆
    Computer Network covered following topics in these notes.
    1. Data Link Layer
    2. Framing
    3. Byte count framing method
    4. Flag bytes with byte stuffing framing method
    5. Flag bits with bit stuffing framing method
    6. Physical layer coding violations framing method
    7. Error control in data link layer
    8. Stop and Wait scheme
    9. Sliding Window Protocol
    10. One bit sliding window protocol
    11. A protocol Using Go-Back-N
    12. Selective repeat protocol
    13. Application layer
    1. Andrew S. Tanenbaum, David J. Wetherall, “Computer Networks” Pearson Education.
    2. Douglas E Comer, “Internetworking with TCP/IP Principles, Protocols, And Architecture",Pearson Education
    3. KavehPahlavan, Prashant Krishnamurthy, “Networking Fundamentals”, Wiley Publication.
    4. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, “Computer Networks: An Open Source Approach”, McGraw Hill.