Creates a file dialog window with the specified title for loading or saving a file.
If the value of mode
is LOAD
, then the
file dialog is finding a file to read, and the files shown are those
in the current directory. If the value of
mode
is SAVE
, the file dialog is finding
a place to write a file.
Note: Some platforms may not support showing the user-specified title in a file dialog. In this situation, either no title will be displayed in the file dialog's title bar or, on some systems, the file dialog's title bar will not be displayed.
parent | the owner of the dialog | |
title | the title of the dialog; a null value
will be accepted without causing a
NullPointerException to be thrown | |
mode | the mode of the dialog; either
FileDialog.LOAD or FileDialog.SAVE |
java.lang.IllegalArgumentException | if an illegal file dialog mode is supplied; | |
java.lang.IllegalArgumentException | if the parent 's
GraphicsConfiguration
is not from a screen device; | |
java.lang.IllegalArgumentException | if parent
is null ; this exception is always thrown when
GraphicsEnvironment.isHeadless
returns true |
java.awt.GraphicsEnvironment.isHeadless, java.awt.FileDialog.LOAD, java.awt.FileDialog.SAVE
Diagram: Container