An applet in java programming language is a small
program that only runs under a Web browser. We can automatically download applet
as part of a Web page. Activation of an applet results in execution of a
program. Applet also provides a way that automatically distribute the client
software from the server whenever the user needs the client software, and no
sooner. The user can get the latest version of the client software without fail
and without difficult re-installation. Because of the feature cross platform (or
in other words platform independent) provided by java, the programmer needs to
create only a single program, which automatically works with all computers
having browsers with built-in Java interpreters.
Applets are executed within the context of a Web page. Applets interact with the user on activation of Web page and stop their execution when his Web page is no longer active. Simple way of using applets makes applets valuable. A user only requires an applet's Web page to download and execute the applet.
Java applets run from inside a browser therefore they require a reference to an applet that is embedded in a Web page using a special HTML tag. When a reader loads a Web page having an applet in it by using a Java-enabled browser, the browser downloads the applet from a Web server and executes it on the local system. Since Java applets run inside a Java browser, therefore they can access to the structure provided by the browser such an existing window, an event-handling and graphics context, and the surrounding user interface. One advantage of using a Java applet over a scripted program is that isn?t available to the client because it is in compiled form.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial