created: 03/07/98; revised: 07/15/02, 08/18/03, 11/02/03, 02/11/06
CHAPTER 36—Applets
This chapter examines Java applets. An applet usually is used as part of a Web page. The applet is responsible for the graphical components and user interaction in a rectangular section of the Web browser's screen. Applets are typically used for user interaction with the Web page.
Chapter Topics:
- Extending the
JAppletclass. - The
setBackground()method. - The
paint()method. - The
Graphicsclass. - Methods of the
Graphicsclass:drawString()setColor()drawOval()drawLine()
- Compiling and running applets.
- Web pages and HTML.
These notes discuss the
JApplet class that
is part of the Swing set of components.
QUESTION 1:
(Thought Question: ) Is an applet a Java application?