import java.awt.*;

public class FileDialogTest
{
        // Pop up a FileDialog, select a file,
        //     and list contents
    public static void main( String [ ] args )
    {
        Frame f = new Frame( );
        f.show( );

        FileDialog d;
        d = new FileDialog( f, "List File", FileDialog.LOAD );
        d.show( );

        String fileName;
        if( ( fileName = d.getFile( ) ) != null )
            ListFiles.listFile( fileName ); // Figure 1.17

        System.exit( 0 );
    }
}
