Unit .5 | 7
a APPLET PROGRAMMING chapler-1-
~Q Explain about different types of Applet.
Apples are sel Java programs that are primly uscd in Internet computing, They ean be transported
Gere ntemet from one computer to another an run sing the Applet Viewer orany Web browser
that supports Java. An applet, ike any application program, ean do many ‘things for us. It can perform
arithmetic operations, display graphics, play sounds, necept user input, create animation, cad play
interactive games,
Java has revolutionized the way the Intemet
network. Java has enabled them to ereate and use
age can now contain not only a simple text ora static
£20 produce graphies, sounds and moving images.
Signisicant impact on the World Wide Web,
Local and Remote Applets
em retrieve and use documents on the world wide
internetive multimedia Web documents. A web
image but also a Java applet which, when sun,
java applets therefore have begun’ to make @
We can embed applets into Web pages in two ways, One, we can write our own applets and embed
them into Web pages. Second, we can download an applet from a remote computer system and then
embed it into a Web page.
LocalApplet;An applet developed locally
applet. When a Web page is trying to fi
Internet It simply searches the directo}
specified applet.
ly and stored in a local system is known as a local
ind a jocal applet, it does not need to use the
ries in the local system and locates and loads the
Remote Applet:A remote applet is that which is developed by someone else and stored
cn a remote computer connected to the Internet, To access a remote apple: we require an
internet connection and the URL of the applet.
Oo. Oo
T totemert
‘Local Computer Applet Remota Computes
(Cin) (SorenQ. Explain about Applets and Applications.
Although doth the applets and stand-alone appheations are Java. programs, there are styntticant
differences between them. Applets are not full-featured application programs. They are usually written
to acoomplish a small fask or a component of a task, Sinee they are usually designed for use on the
Tntemet, they impose cestain limitations and restrictions in their design.
ing the execution of the code.
Applets do not use the main() method for initiz
methods of Applet class to start
Applets, when loaded, automatically call cert
and execute the applet code.
Unlike stand-alone applications, applets cannot be run independently. They are
run from inside a Web page usinga special feature known as HTML tag.
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 provide security by verifying the generated byte code and no memory
space isallocated till the reverification process completes
Applet ByteCode
74177
Reverification
Execution
Memory Allocation
Client
ByteCode
—wewowrvrvvrveiwevrew wrwwwe
ney ancl UNNI 4, Apple nognams in Taw
Q. How to build an Applet. J maples mye o
Before we try to write applets,
also ensure that either the jav:
‘The steps involved in develop
Wwe must make sure that java installed properly and
a appletviewer or java enabled browser is available.
ing and testing in applet are :
* Building an applet code.
* Creating an executable applet code.
* Creating a web page using HTML tags.
* Preparing