FileDialog (AWT)

Use a FileDialog bean FileDialog to provide a dialog where the user can open or save files. File dialogs are useful in stand-alone applications and are not typically used in applets because of security constraints.

The FileDialog bean represents a system file dialog. The bean appears on the free-form surface as an icon because it cannot be composed.

Changing Default Property Settings
Setting Value Description
directory specify the directory Define the initial directory selection information for the file dialog
file specify the file Define the initial file selection information for the file dialog
filenameFilter specify the filename filter Define the file type selection information for the file dialog
mode Load Set the value to Load for an Open File dialog
Save Set value to Save for an Save file dialog


Related procedures
Composing a window

Related references
Window beans
Beans for visual composition
Sun's FileDialog bean documentation