Chapter 12. Chooser Dialogs
Just about every application you write
these days needs to have a mechanism for opening and saving files. In
the AWT, you can use the
FileDialog class, but this is a heavyweight dialog
that lacks the flexibility of the Swing components
we've seen so far. The
JFileChooser is Swing's answer to
the FileDialog. The Swing package also contains a
helper dialog for choosing colors (a common task during application
configuration). We'll look at both of these dialogs
in this chapter.
To get things started, Figure 12-1 shows the class
hierarchy of the pieces we'll be looking at in this
chapter.
|