6 Applet Programming in Java

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Applets are small applications which are

transported over the internet server, install


themselves automatically without any
manual assistance and run as a part of web
document. They can be transported over the
internet from one computer to another and
run using the applet viewer or any web
browser that supports java.

Local Applets - An applet developed locally


and stored in a local system is known as local
applet, it doesnt require any internet
connections.
Remote Applets - A remote applet is that
which is developed by someone else and stored
on a remote computer connected to the
internet, which we can download the applet
onto our system via the internet and run it.

Born or Initialization state.


Running state.
Idle state.
Dead or Destroyed state.

BORN

Initialization

Begin
start()

Display
IDLE

RUNNING

Stopped

start()
paint()
destroy()

Destroyed

DEAD

END

Applets
.Applets are small programs.
Applet dont have the main
method.
Applets can run in browsers
window or in Applet viewer.(To
run the applet in an Applet
viewer will be an advantage
for debugging)
Applets are designed for the
client site programming
purpose.

Application

Applications are larger


programs.
Application execution
starts with the main method.
Application can run in
browsers window.

.Application

dont have
such type of criteria.

Draw pictures on a web page.


Create a new window and draw in it.
Play sounds.
Receive input from the user through the
keyboard or the mouse.
Make a network connection to the server
from which it came and can send and receive
data from that server.

Applets are cross platform and can run on


Windows, MacOS and Linux platform.
Applets can work all the version of java plug-in.
Applets runs in a sandbox, so the user does not
need ton trust the code, so it can work without
security approval.
Applets are supported by most web browsers..
Applets are cached in most web browsers, so will
be quick to load when returning to a web page.

Java plug-in is required to run applet.


Java applet requires JVM(Java Virtual
Machine),so first time it takes significant startup
time.
If java applet is not already cached in the
machine, it will be downloaded from internet and
will take time.
Its difficult to design and build good user
interface in applets compared to HTML
technology.

Java applets runs on the java and enables web


browsers such as Mozilla, Netscape Navigator
and Internet Explorer. Applets are ideal for the
web because they leverage browser features,
which decreases file size, increases download
speed and simplify the programming.

You might also like