FileDialogNameFileDialog
DescriptionThe FileDialog class provides file selection capabilities for opening or saving files. Because FileDialog is a subclass of Dialog, a FileDialog is always associated with a Frame and is hidden by default. FileDialogs are always modal (i.e., they always attract all user input). In addition, FileDialogs have a load/save mode; the LOAD mode is for selecting files for an application to load, SAVE is for selecting a filename to save. Class Definition
public class java.awt.FileDialog extends java.awt.Dialog { // Constants public final static int LOAD; public final static int SAVE; // Constructors public FileDialog (Frame parent); public FileDialog (Frame parent, String title); public FileDialog (Frame parent, String title, int mode); // Instance Methods public void addNotify(); public String getDirectory(); public String getFile(); public FilenameFilter getFilenameFilter(); public int getMode(); public synchronized void setDirectory (String directory); public synchronized void setFile (String file); public synchronized void setFilenameFilter (FilenameFilter filter); public void setMode(int mode); // Protected Instance Methods protected String paramString(); } ConstantsLOADpublic final static int LOADConstant to specify the FileDialog's load mode. SAVEpublic final static int SAVEConstant to specify the FileDialog's save mode. ConstructorsFileDialogpublic FileDialog (Frame parent)
public FileDialog (Frame parent, String title)
public FileDialog (Frame parent, String title, int mode)
Instance MethodsaddNotifypublic void addNotify()
getDirectorypublic String getDirectory()
getFilepublic String getFile()
getFilenameFilterpublic FilenameFilter getFilenameFilter()
getModepublic int getMode()
setDirectorypublic synchronized void setDirectory (String directory)
setFilepublic synchronized void setFile (String file)
setFilenameFilterpublic synchronized void setFilenameFilter (FilenameFilter filter)
setModepublic void setMode (int mode)
Protected Instance MethodsparamStringprotected String paramString()
See AlsoDialog, FilenameFilter, String |
|