
4.1 Applet Structure 177
with the low temperatures shown in blue, the moderate temperatures
shown in yellow, and the high temperatures shown in red.
In this chapter, we begin by adding graphical output to applets. Later, when
we cover GUIs in Chapter 12, we’ll show you how to add graphical output
to a Java application.
4.1 Applet Structure
The JApplet class, an existing Java class of the javax.swing package, provides
the basic functionality of an applet. An applet class that we write is an
extension of the JApplet class. In Java, the extends keyword specifies that
one class is an extension of another and inherits the properties of the other
class. Inheritance ...