Java java.awt FileDialog fields, constructors, methods, implement or subclass

Example usage for Java java.awt FileDialog fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt FileDialog.

The text is from its open source code.

Field

intLOAD
This constant value indicates that the purpose of the file dialog window is to locate a file from which to read.
intSAVE
This constant value indicates that the purpose of the file dialog window is to locate a file to which to write.

Constructor

FileDialog(Frame parent, String title, int mode)
Creates a file dialog window with the specified title for loading or saving a file.
FileDialog(Dialog parent, String title, int mode)
Creates a file dialog window with the specified title for loading or saving a file.
FileDialog(Frame parent)
Creates a file dialog for loading a file.
FileDialog(Dialog parent)
Creates a file dialog for loading a file.
FileDialog(Frame parent, String title)
Creates a file dialog window with the specified title for loading a file.
FileDialog(Dialog parent, String title)
Creates a file dialog window with the specified title for loading a file.

Method

voiddispose()
Releases all of the native screen resources used by this Window , its subcomponents, and all of its owned children.
StringgetDirectory()
Gets the directory of this file dialog.
StringgetFile()
Gets the selected file of this file dialog.
File[]getFiles()
Returns files that the user selects.
DimensiongetSize()
Returns the size of this component in the form of a Dimension object.
voidsetDirectory(String dir)
Sets the directory of this file dialog window to be the specified directory.
voidsetFile(String file)
Sets the selected file for this file dialog window to be the specified file.
voidsetFilenameFilter(FilenameFilter filter)
Sets the filename filter for this file dialog window to the specified filter.
voidsetLocation(int x, int y)

The method changes the geometry-related data.

voidsetLocationRelativeTo(Component c)
Sets the location of the window relative to the specified component according to the following scenarios.
voidsetModal(boolean modal)
Specifies whether this dialog should be modal.
voidsetModalityType(ModalityType type)
Sets the modality type for this dialog.
voidsetMode(int mode)
Sets the mode of the file dialog.
voidsetMultipleMode(boolean enable)
Enables or disables multiple file selection for the file dialog.
voidsetTitle(String title)

Note: Some platforms may not support showing the user-specified title in a file dialog.

voidsetVisible(boolean b)
Shows or hides this Dialog depending on the value of parameter b .
voidshow()
Makes the Dialog visible.