Applets
are small Java programs that are primarily used in internet computing.
Applets
can be transported over the Internet from one computer to another and run using
Applet Viewer or any web browser
that supports Java.
Applet
can perform arithmetic operations, display graphics, play sounds, accept user
input, create animation, and play interactive game.
Local and
Remote Applets:
o Applet
can be embedded into web pages in two different ways: First, Writing own
applets and embedding them into web pages. Second, download an applet from
remote system and then embed it into a web page.
o An
applet developed locally and stored in a local system is known as local applet. When a web page is trying
to find a local applet, it simply searches the directories in the local system
and locates and loads the specified applet. Thus no internet connection is
required.
o
A remote appletis that which is developed by someone else and stored
on a remote computer connected to the internet. In order to locate and load a
remote applet address on web. This address is known as Uniform Resource Locator
and must be specified in the applet’s HTML document as the value of the
CODEBASE attribute.
Difference
between Applet and Application:
o Applets
do not use the main() method for
initiating the execution of the code. Applets when loaded, automatically call
certain methods of Applet class to start and execute the applet code.
o Applets
can’t run independently. They are run from insidea web page using a special
feature known as HTML tags.
o Applets
cannot read from or write to the files in the local computer.
o Applets
cannot communicate with other servers on the networks.
o
Applets cannot run any program
from local computers.
Applets are restricted from using libraries from
other languages such as C or C++. (Java supports this feature through native methods)
No comments:
Write comments