0% found this document useful (0 votes)
6 views10 pages

Understanding Java Applets: Overview & Lifecycle

This document provides an overview of Java applets including: - What Java applets are and how they run on the client-side within a web browser. - The advantages of applets such as less response time and ability to run on multiple platforms. - Some restrictions and limitations of applets. - The applet lifecycle including initialization, starting, painting, stopping and destruction. - The different ways to run a Java applet using a web browser or the Java applet viewer.

Uploaded by

Raju Das
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

Understanding Java Applets: Overview & Lifecycle

This document provides an overview of Java applets including: - What Java applets are and how they run on the client-side within a web browser. - The advantages of applets such as less response time and ability to run on multiple platforms. - Some restrictions and limitations of applets. - The applet lifecycle including initialization, starting, painting, stopping and destruction. - The different ways to run a Java applet using a web browser or the Java applet viewer.

Uploaded by

Raju Das
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Presentation

on
Java Applets

Done by
Raju Das(Roll No-20)
Jyoti Sharma(Roll no-23)
Guided By:-
Sir Saurav Choudhury Rajibul(Roll no-22)
What is Java Applet.?

Java Applets is a special type of programme that is


embedded in the webpage to generate the dynamic
content. It runs inside the browser and works at the
client side.
Advantages of Applet

 It works on Client Side, so less response time.


 Its secured.
 It can be run by browsers running under many
platforms.
Restrictions and Limitations of Applets

 Plugin is required at client side to execute applets


 Applets cannot read from or write to the files in
the local computer.
 Applets cannot communicate with other servers on
the network.
 Applets cannot run any program from the local
computer.
 Applets cannot be run Independently. They are run
inside a web page using a special feature known as
HTML tag.
Applet Hierarchy

Object.
Component.

Container.

Panel.

Applet.

As Displayed in the above figure, Applet class


extends Panel
Panel class extends Container which is a
subclass of component.
Lifecycle of Applet Initialized

Applet is Initialised. Destroyed Started


Applet is started.
Applet is painted.
Applet is stopped.
Stopped Painted
Applet is Destroyed.
Lifecycle methods for Applets
The [Link] class provides 4 life cycle methods &
[Link] class provides 1 life cycle methods for an applet.

 Public void init():It is used to initialized the Applet. Its invoked


only once.
 Public void start():It is invoked after the init() method or
browser is maximized. Its used to start the applet.
 Public void stop():Method used to stop the applet. Its invoked
when Applet is stop or browser is minimized.
 Public void destroy():Method used to Destroy Applet. Its invoked
only once.
Ways to run a Java Applet

To run a Applet we need one of the following


tools:
1. A java Enable Web browser(such as Hotjava
or Netscape).
2. Java Applet Viewer.
[Link] Applet on a Web Browser

If we use a Java enable web


browser such as Hotjava or
Netscape we will see the entire
web page containing the applet.
[Link] Applet on a Java Appletviewer

If we use the applet viewer tool,we will only see the


applet [Link] is to be noticed that appletviewer
is not a full-fledged web browser therefore it
ignores all of the HTML tags except the part
pertaining to the running of the applet.

You might also like