import java.io.*;
import javabook.*;
import java.awt.*;

/**
 *   Program TestFileDialog
 *
 * <p>
 * A program to verify the use of FileDialog object.
 */

class TestFileDialog
{
   public static void main (String[] args) 
   {
      MainWindow mainWindow = new MainWindow();
      
      mainWindow.setVisible( true );
      
      FileDialog fileBox = new FileDialog( mainWindow, "Open", FileDialog.LOAD );
    //  FileDialog fileBox = new FileDialog( mainWindow, "Save", FileDialog.SAVE );
      
     // fileBox.setModal(true);
      fileBox.setVisible(true);
      
      String filename = fileBox.getFile( );
      
      System.out.println("File selected: " + filename );
      
     
   }
}