Example usage for java.awt FileDialog FileDialog

List of usage examples for java.awt FileDialog FileDialog

Introduction

In this page you can find the example usage for java.awt FileDialog FileDialog.

Prototype

public FileDialog(Dialog parent) 

Source Link

Document

Creates a file dialog for loading a file.

Usage

From source file:VASSAL.build.GameModule.java

/**
 * @deprecated Use {@link #getFileChooser} instead.
 *//*  w  w w .  j a va  2s  . c o m*/
@Deprecated
public FileDialog getFileDialog() {
    if (fileDialog == null) {
        fileDialog = new FileDialog(getFrame());
        File f = getGameState().getSavedGameDirectoryPreference().getFileValue();
        if (f != null) {
            fileDialog.setDirectory(f.getPath());
        }
        fileDialog.setModal(true);
    } else {
        fileDialog.setDirectory(fileDialog.getDirectory());
    }
    return fileDialog;
}