Java Reference
In-Depth Information
FIGURE 12-26
Sample run of the Java Kiosk program
QUICK REVIEW
1
.
The term applet means a little application.
2
.
An applet is a Java program that is embedded within a Web page and
executed by a Web browser.
3
.
You create an applet by extending the
class
JApplet
, which is contained
in the
package
javax.swing
.
4
.
Unlike a Java application program, a Java applet does not have the
main
method.
5
.
When a browser runs an applet, the methods
init
,
start
, and
paint
are
guaranteed to be invoked in sequence.
6
.
All statements to be executed only once are kept in the
init
method of an
applet.
7
.
An applet does not have a title.
8
.
The
class
es
Font
and
Color
are contained in the
package
java.awt
.
9
.
Java uses the color scheme known as RGB, where R stands for red, G for
green, and B for blue.
10
.
You create instances of the
class
Color
by mixing red, green, and blue
hues in various proportions.
11
.
An applet class is derived from the
class
JApplet
, whereas a GUI
application class is created by extending the
class
JFrame
.
1
2
Search WWH ::
Custom Search