| Chapter 14: Basic Swing |
|---|
| Source Code in This Chapter |
|---|
![]() |
|---|
| Order now |
JAppletExample use
WindowUtilities.java and
ExitListener.java.
WindowListener with support to close the window.
JApplet) created in Swing. Illustrates setting
the look and feel, adding components to the content pane, and changing
the layout to FlowLayout (default is BorderLayout).
See JAppletExample.html
(requires the Java Plug-In
or a Java 2 compliant browser, for example, Netscape 6.x).
JFrame.
As with a JApplet, components must be added to the
content pane, instead of the window directly.
JLabels is that the label text can
contain HTML markup.
Uses image JHUAPL.gif
JPanel can contain custom borders. Typically, utility
methods in the BorderFactory class are used to
create a border for the panel.
Uses the following class:
JPanel that displays six radio buttons
with labels.
JColorChooser which presents
a dialog with three different tabbed panes to allow the user
to select a color preference. The dialog returns a Color
object based on the user's selection or null if
the user entered Cancel.
JInternalFrame)
in a desktop pane (JDesktopPane).
JToolBar.
Uses the following classes and images:
JEditorPane). By attaching
an HyperlinkListener, the editor pane is responsive to
hyperlinks selected by the user.
Uses the following class and image:
ItemEvents
in response to selecting a radio button.
| URLs in This Chapter |
|---|
| General |
|---|