The use of Java on the client is usually in the form of an applet. An applet is more or less a user interface control that is placed in a Web page. An applet is made up of both system and custom classes. A custom applet extends, or inherits, from the Java applet class. Additional user interface capabilities are available with the Abstract Windowing Toolkit (AWT), a Java class library that contains most of the user interface primitives and tools. More advanced user interface functions can be obtained from the Java Foundation Classes (JFC) and Swing components.
 In addition to basic user interface tools, 3-D user interface libraries and specifications are available for the Java platform.
Because applets are referenced by a Web page, they need to be identified by a tag. The tag is used to identify an applet and, most important, where it can be obtained. In addition to being platform neutral, Java applets are a good fit for the Web because deployment of applets is almost automatic. An tag's parameters define the type of object (Java), the name of the class file to load and run, and, optionally, the location, or URL, where the file or files can be found on the network. In the following HTML example, an applet called Bubbles is displayed to the user. The text between the begin and end tags is displayed in place of the applet for non-Java-enabled browsers.
 Previous versions of HTML had a separate tag. This tag, however, has been deprecated, and the more general tag is recommended instead.Java applet that draws animated bubbles.
In this example, the codetype parameter indicates that the object is a Java applet. The classid parameter identifies the class name of the appletthe object that inherited the applet interface. The codebase parameter indicates that the Java applet class file can be obtained from the server www.wae-uml.org in the javaclasses directory and with HTTP. This means that the browser can get the applet by making another GET request to the Web server www.wae-uml.org.
Parameters can be supplied to an applet within the context of the tag. Separate tags can be placed between the begin and end tags. The browser allows the applet to access these parameters. In the following example, two parameters are defined for the applet:
One nice thing about Java applets is that, once they are downloaded to the client, the next time they are invoked, they don't have to be downloaded again. Let's face it: The Internet is slow, and downloading large Java applets can be time consuming, especially over a slow modem. Caching applets on the client can save a lot of time. Each time the Web page is revisited, the browser checks to see whether the applet has already been downloaded and makes sure that it has the correct version. If the version has changed or the cached applet no longer exists on the client, it is downloaded.
When a Java applet is created, many class files usually make up the application. To help manage this, a Java Archive (JAR) file can be created to package all the class files into a single archive file. A JAR file is, essentially, a ZIP file that contains all the class and auxiliary files necessary to execute an applet. A JAR file compresses the files, making them quicker to transmit over slow network connections.
In addition to easier management of Java files, one advantage of JAR files is security. JAR files can be digitally signed. When a user accepts a digitally signed JAR file, the applet could be granted security privileges that it might not otherwise have on the client machine.
Overview of Modeling and Web-Related Technologies
Building Web Applications