Download the JDK
Search the Tutorials
Hide the TOC
Trail: Deployment
Lesson: Applets
Applets
Getting Started with Applets
Importing Classes and Packages for Applets
Defining an Applet Subclass
The Life Cycle of an Applet
Methods for Milestones
Methods for Drawing and Event Handling
Methods for Adding UI Components
What Applets Can and Can't Do
Taking Advantage of the Applet API
Finding and Loading Data Files
Displaying Short Status Strings
Displaying Documents in the Browser
Sending Messages to Other Applets
Playing Sounds
Defining and Using Applet Parameters
Deciding Which Parameters to Support
Writing the Code to Support Parameters
Giving Information about Parameters
Using the APPLET Tag
Practical Considerations When Writing Applets
Security Restrictions
Creating a User Interface
Creating a GUI
Displaying Diagnostics to the Standard Output and Error Streams
Getting System Properties
Threads in Applets
Threads in Applets: Examples
Working with a Server-Side Application
A Simple Network Client Applet
Using a Server to Work Around Security Restrictions
Finishing an Applet
Before You Ship that Applet
The Perfectly Finished Applet
Deploying Applets
General Deployment Considerations
Using the applet Tag
Using the object Tag
Using the embed Tag
Deploying Applets in a Mixed-Browser Environment
Solving Common Applet Problems
Questions and Exercises
Home Page > Deployment > Applets
« Previous • Trail • Next »
Practical Considerations When Writing Applets

> The first two sections in this lesson discussed all of the applet-specific API. However, most applets rely on a lot of API that isn't specific to applets. This section gives you hints about using the Java API, covering the areas that are affected by applets' close relationships with browsers.

### Security Restrictions

> This section lists the security restrictions that untrusted applets face. It also describes some ways to get around the restrictions.

### Creating a User Interface

> This section discusses the elements of an applet's UI. It then goes on to give hints for creating a GUI and creating debugging output using the standard output and standard error streams.

### Getting System Properties

> This section discusses the system properties that an applet can get to find out about its environment. It includes an example applet that displays the ten properties applets can get. It also lists some properties that applets typically can't get.

### Threads in Applets

> This section delves into the issues of using threads in applets. A thread — sometimes called an execution context or a lightweight process — is a single sequential flow of control within a process. Even the simplest applets run in multiple threads, although it's not always apparent. Many applets create and use their own threads so that they perform well without affecting the performance of the browser they run in or the performance of other applets.

### Working with a Server-Side Application

> This section shows how even untrusted applets can use networking code to communicate with programs running on the host from which they came.

« Previous • Trail • Next »
Previous page: Using the APPLET Tag
Next page: Security Restrictions