You are here
Home > Java > Java Applet Life-cycle Program

Java Applet Life-cycle Program

Hello friends today I’m going to show you life-cycle of Java Applet. Applet is a Java Program which runs in browser and can also be run and tested using appletviewer command in java. Applet runs in browser that means it is executed at client side. To run applet, client should have Java installed in his/her computer. Applet code is downloaded from web server before it is executed.

applet-life-cycle

Applet Life-cycle Program

To run this applet using appletviewer command type appletviewer AppletLifecycle.java in command prompt.

To run this applet in browser create a html file and copy commented applet tag code in html file, and open that html file in browser.

Output in AppletViewer

applet-life-cycle-output

After clicking close button of this window we will get below message box

applet-life-cycle-output2

After clicking OK button we will get below message box

applet-life-cycle-output3

 

Thanks..

You can share if you like it

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
https://www.zatackcoder.com

Comments

zatackcoder
Top

  Â