FileDialog.getAddExtension

Overview | Methods | This Package | All Packages

FileDialog.getAddExtension

Retrieves a boolean value indicating whether the dialog box automatically adds an extension to a file name when the user omits the extension.

Syntax

public final boolean getAddExtension()

Return Value

Returns true if the dialog box adds an extension to a file name when the user omits the extension; otherwise, returns false.

Remarks

The extension added to a file name depends on the currently selected file filter and the value of the checkFileExists property. If the checkFileExists property is true, the dialog box adds the first extension from the current file filter that matches an existing file; if no files match the current file filter, the dialog box adds the extension specified in the defaultExt property. If the checkFileExists property is false, the dialog box adds the first valid file extension from the current file filter; if the current file filter contains no valid file extensions, the dialog box adds the extension specified in the defaultExt property.

See Also   setAddExtension