<title>Example of a link </title>
href="http://www.sumtotalz.com/TotalAppsWorks/Applet/AppletLifeCycle_Tutorial.html"> Tutorial: Applet Life Cycle Tutorial </a>
This tutorial assumes that you have read and completed the following three tutorials.
The purpose of this tutorial is to introduce you to a basic applet program. The program we will build in this tutorial is a very basic applet program, with little function. In this tutorial, we will explore the life cycle of an applet or the stages an applet goes through from the time it is loaded into memory unil it shuts down. The reason for this approach is to set the basis for building more complex applets in later tutorials.
What is an applet? An applet is a program that runs in a Browser's HTML page. For example, the
an applet for a Hello World program looks like:
and the HTML that contains it looks like:
In the next section, we will explore the requirements for this program.
The requirements for this project are to:
If you look in a dictionary, template is defined as
In C++, a template is a keyword that allows you to create generic functions and/or classes. Java has a keyword interface that is similar, but for our purposes, we will say they are not the same. Based on what we have seen in the tutorials Getting Started and
First cup of Java, how does the term template apply? Remember that a template is a pattern; therefore, the applet template for Hello World looks like the template shown in Figure 1 above.
These templates are not complete. (see Tutorial: A Second Cup of Java for a more complete discussion.)
For the purposes of this tutorial, we will start our template as shown in the following figure.
The above template has no functionality. If we wanted to add some functionality, we could add