<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.FileDialog
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.EventQueue.html#_top_">Previous</a>  <a href="java.awt.FlowLayout.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.FileDialog
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.awt.Component.html#_top_">java.awt.Component</a>
           |
           +----<a href="java.awt.Container.html#_top_">java.awt.Container</a>
                   |
                   +----<a href="java.awt.Window.html#_top_">java.awt.Window</a>
                           |
                           +----<a href="java.awt.Dialog.html#_top_">java.awt.Dialog</a>
                                   |
                                   +----java.awt.FileDialog
</pre>
<hr>
<dl>
  <dt> public class <b>FileDialog</b>
  <dt> extends <a href="java.awt.Dialog.html#_top_">Dialog</a>
</dl>
The <code>FileDialog</code> class displays a dialog window 
 from which the user can select a file. 
 <p>
 Since it is a modal dialog, when the application calls 
 its <code>show</code> method to display the dialog, 
 it blocks the rest of the application until the user has 
 chosen a file.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Window.html#show">show</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LOAD"><b>LOAD</b></a>
  <dd>  This constant value indicates that the purpose of the file  
 dialog window is to locate a file from which to read.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SAVE"><b>SAVE</b></a>
  <dd>  This constant value indicates that the purpose of the file  
 dialog window is to locate a file to which to write.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FileDialog(java.awt.Frame)"><b>FileDialog</b></a>(Frame)
  <dd>  Creates a file dialog for loading a file.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FileDialog(java.awt.Frame, java.lang.String)"><b>FileDialog</b></a>(Frame, String)
  <dd>  Creates a file dialog window with the specified title for loading 
 a file.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FileDialog(java.awt.Frame, java.lang.String, int)"><b>FileDialog</b></a>(Frame, String, int)
  <dd>  Creates a file dialog window with the specified title for loading 
 or saving a file.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addNotify()"><b>addNotify</b></a>()
  <dd>  Creates the file dialog's peer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDirectory()"><b>getDirectory</b></a>()
  <dd>  Gets the directory of this file dialog.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFile()"><b>getFile</b></a>()
  <dd>  Gets the selected file of this file dialog.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFilenameFilter()"><b>getFilenameFilter</b></a>()
  <dd>  Determines this file dialog's filename filter.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMode()"><b>getMode</b></a>()
  <dd>  Indicates whether this file dialog box is for loading from a file 
 or for saving to a file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#paramString()"><b>paramString</b></a>()
  <dd>  Returns the parameter string representing the state of this file 
 dialog window.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDirectory(java.lang.String)"><b>setDirectory</b></a>(String)
  <dd>  Sets the directory of this file dialog window to be the  
 specified directory.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setFile(java.lang.String)"><b>setFile</b></a>(String)
  <dd>  Sets the selected file for this file dialog window to be the 
 specified file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setFilenameFilter(java.io.FilenameFilter)"><b>setFilenameFilter</b></a>(FilenameFilter)
  <dd>  Sets the filename filter for this file dialog window to the 
 specified filter.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setMode(int)"><b>setMode</b></a>(int)
  <dd>  Sets the mode of the file dialog.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="LOAD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LOAD</b>
<pre>
 public static final int LOAD
</pre>
<dl>
  <dd> This constant value indicates that the purpose of the file  
 dialog window is to locate a file from which to read.<p>
</dl>
<a name="SAVE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SAVE</b>
<pre>
 public static final int SAVE
</pre>
<dl>
  <dd> This constant value indicates that the purpose of the file  
 dialog window is to locate a file to which to write.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="FileDialog"></a>
<a name="FileDialog(java.awt.Frame)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileDialog</b>
<pre>
 public FileDialog(<a href="java.awt.Frame.html#_top_">Frame</a> parent)
</pre>
<dl>
  <dd> Creates a file dialog for loading a file.  The title of the
 file dialog is initially empty.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parent - the owner of the dialog
  </dl></dd>
</dl>
<a name="FileDialog(java.awt.Frame, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileDialog</b>
<pre>
 public FileDialog(<a href="java.awt.Frame.html#_top_">Frame</a> parent,
                   <a href="java.lang.String.html#_top_">String</a> title)
</pre>
<dl>
  <dd> Creates a file dialog window with the specified title for loading 
 a file. The files shown are those in the current directory.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parent - the owner of the dialog.
    <dd> title - the title of the dialog.
  </dl></dd>
</dl>
<a name="FileDialog(java.awt.Frame, java.lang.String, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileDialog</b>
<pre>
 public FileDialog(<a href="java.awt.Frame.html#_top_">Frame</a> parent,
                   <a href="java.lang.String.html#_top_">String</a> title,
                   int mode)
</pre>
<dl>
  <dd> Creates a file dialog window with the specified title for loading 
 or saving a file. 
 <p>
 If the value of <code>mode</code> is <code>LOAD</code>, then the 
 file dialog is finding a file to read. If the value of 
 <code>mode</code> is <code>SAVE</code>, the file dialog is finding 
 a place to write a file.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parent - the owner of the dialog.
    <dd> title - the title of the dialog.
    <dd> mode - the mode of the dialog.
    <dt> <b>See Also:</b>
    <dd> <a href="#LOAD">LOAD</a>, <a href="#SAVE">SAVE</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="addNotify()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addNotify"><b>addNotify</b></a>
<pre>
 public void addNotify()
</pre>
<dl>
  <dd> Creates the file dialog's peer.  The peer allows us to change the look
 of the file dialog without changing its functionality.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.Dialog.html#addNotify()">addNotify</a> in class <a href="java.awt.Dialog.html#_top_">Dialog</a>
  </dl></dd>
</dl>
<a name="getMode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMode"><b>getMode</b></a>
<pre>
 public int getMode()
</pre>
<dl>
  <dd> Indicates whether this file dialog box is for loading from a file 
 or for saving to a file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the mode of this file dialog window, either
               <code>FileDialog.LOAD</code> or 
               <code>FileDialog.SAVE</code>.
    <dt> <b>See Also:</b>
    <dd> <a href="#LOAD">LOAD</a>, <a href="#SAVE">SAVE</a>, <a href="#setMode">setMode</a>
  </dl></dd>
</dl>
<a name="setMode(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setMode"><b>setMode</b></a>
<pre>
 public void setMode(int mode)
</pre>
<dl>
  <dd> Sets the mode of the file dialog.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> mode - the mode for this file dialog, either
                 <code>FileDialog.LOAD</code> or 
                 <code>FileDialog.SAVE</code>.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> if an illegal file
                 dialog mode is used.
    <dt> <b>See Also:</b>
    <dd> <a href="#LOAD">LOAD</a>, <a href="#SAVE">SAVE</a>, <a href="#getMode">getMode</a>
  </dl></dd>
</dl>
<a name="getDirectory()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDirectory"><b>getDirectory</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getDirectory()
</pre>
<dl>
  <dd> Gets the directory of this file dialog.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the directory of this file dialog.
    <dt> <b>See Also:</b>
    <dd> <a href="#setDirectory">setDirectory</a>
  </dl></dd>
</dl>
<a name="setDirectory(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDirectory"><b>setDirectory</b></a>
<pre>
 public void setDirectory(<a href="java.lang.String.html#_top_">String</a> dir)
</pre>
<dl>
  <dd> Sets the directory of this file dialog window to be the  
 specified directory.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dir - the specific directory.
    <dt> <b>See Also:</b>
    <dd> <a href="#getDirectory">getDirectory</a>
  </dl></dd>
</dl>
<a name="getFile()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFile"><b>getFile</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getFile()
</pre>
<dl>
  <dd> Gets the selected file of this file dialog.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the currently selected file of this file dialog window,
                or <code>null</code> if none is selected.
    <dt> <b>See Also:</b>
    <dd> <a href="#setFile">setFile</a>
  </dl></dd>
</dl>
<a name="setFile(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setFile"><b>setFile</b></a>
<pre>
 public void setFile(<a href="java.lang.String.html#_top_">String</a> file)
</pre>
<dl>
  <dd> Sets the selected file for this file dialog window to be the 
 specified file. This file becomes the default file if it is set 
 before the file dialog window is first shown.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> file - the file being set.
    <dt> <b>See Also:</b>
    <dd> <a href="#getFile">getFile</a>
  </dl></dd>
</dl>
<a name="getFilenameFilter()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFilenameFilter"><b>getFilenameFilter</b></a>
<pre>
 public <a href="java.io.FilenameFilter.html#_top_">FilenameFilter</a> getFilenameFilter()
</pre>
<dl>
  <dd> Determines this file dialog's filename filter. A filename filter 
 allows the user to specify which files appear in the file dialog 
 window.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> this file dialog's filename filter.
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.FilenameFilter.html#_top_">FilenameFilter</a>, <a href="#setFilenameFilter">setFilenameFilter</a>
  </dl></dd>
</dl>
<a name="setFilenameFilter(java.io.FilenameFilter)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setFilenameFilter"><b>setFilenameFilter</b></a>
<pre>
 public synchronized void setFilenameFilter(<a href="java.io.FilenameFilter.html#_top_">FilenameFilter</a> filter)
</pre>
<dl>
  <dd> Sets the filename filter for this file dialog window to the 
 specified filter.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> filter - the specified filter.
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.FilenameFilter.html#_top_">FilenameFilter</a>, <a href="#getFilenameFilter">getFilenameFilter</a>
  </dl></dd>
</dl>
<a name="paramString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="paramString"><b>paramString</b></a>
<pre>
 protected <a href="java.lang.String.html#_top_">String</a> paramString()
</pre>
<dl>
  <dd> Returns the parameter string representing the state of this file 
 dialog window. This string is useful for debugging.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the parameter string of this file dialog window.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.Dialog.html#paramString()">paramString</a> in class <a href="java.awt.Dialog.html#_top_">Dialog</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.EventQueue.html#_top_">Previous</a>  <a href="java.awt.FlowLayout.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
