Applet

An applet is any small application that performs one specific task; sometimes running within the context a larger program perhaps as a plug-in. However, the term typically also refers to programs written in the Java programming language which are included in an HTML page.

Applet as standalone application
Some applets are able to function as any other normal software application (provided they are hosted by an operating system), but are small in size and perform only a small set of tasks. Examples of applications often classified as applets are all of the Accessories in Microsoft Windows (such as Windows Notepad or Microsoft Paint).

Applet as extension of other Software
In some cases, an applet does not run independently. Such applets must run in a container, which is provided by a host program, through a plugin, or a variety of other applications including mobile devices that support the applet programming model.

Examples of Web-based Applets include:
 * QuickTime movies
 * Flash movies.
 * Windows Media Player applets are used to display embedded video files in Internet Explorer (and other browsers that support the plugin).
 * 3D-modelling display applets allows a view of a model to be rotated and zoomed.
 * Browser games can be applet-based, though some may develop into fully functional applications that require installation.

Applet vs Subroutine
A larger application distinguishes its applets from its own "subroutine" by several features:
 * Applets execute only on the "client" platform environment of a system, as contrasted from "servlet". As such, an applet provides functionality or performance beyond the default capabilities of its container (the browser).
 * Applets capabilities are restricted by the container.
 * Applets are written in a language different from the scripting or HTML language which invokes it. The applet is written in a compiled language, while the scripting language of the container is an interpreted language, hence the greater performance or functionality of the applet. Unlike a "subroutine", a complete web component can be implemented as an applet.

Java Applet
Java Applets are used to provide interactive features to web applications that cannot be provided by HTML. Since Java's bytecode is platform independent, Java applets can be executed by browsers for many platforms, including Windows, Unix, Mac OS and Linux. When a Java technology-enabled browser views a page that contains an applet, the applet's code is transferred to the clients system and executed by the browser's Java Virtual Machine (JVM). An applet is referenced in a HTML page via the (now deprecated)  tag.The  tag has been replaced by the  tag.