| Chapter 15: Advanced Swing |
|---|
| Source Code in This Chapter |
|---|
![]() |
|---|
| Order now |
FileTransfer use
WindowUtilities.java and
ExitListener.java.
JList
constructor. In addition, a private class,
ValueReporter, implements a ListSelectionListener
to display the last entry in the list selected by the user.
DefaultListModel. By default, a JList
doesn't permit you to directly add new entries; however, with the
DefaultListModel you can add or delete entries to the model
(which are reflected in the list).
ListModel interface which
provides support for custom data structures) to store data for
the list.
JavaLocation (below) objects.
JavaLocation as a JLabel containing
an Icon (for the flag) and text (country and description).
Uses the following classes and images:
JLabel for each item to
display in the list.
ListModel interface) to store data for
a list.
JavaLocation (below) objects.
DefaultMutableTreeNodes.
A DefualtMutableTreeNode is a starting point for a root node,
in which children nodes can be added.
DefaultTableModel.
CustomTableModel to correctly
display cells containing images and boolean values.
Uses the following classes and images:
JavaLocation (below) objects.
Graphics2D object.
Uses the following classes:
JPanel containing a Java 2D drawing.
WindowListener with support to close the window.
| General |
|---|