|
Duplicate :
|
|
|
Duplicate :
|
|
|
Duplicate :
|
|
|
Duplicate :
|
|
|
Relates :
|
Execute the following simple test:
import java.awt.*;
public class slash {
public static void main(String[] args) {
FileDialog fd = new FileDialog((Frame)null, "save", FileDialog.SAVE);
fd.setVisible(true);
System.err.println("dir: " + fd.getDirectory());
}
}
Note that the dialog is modal, so System.err.println() should be executed after the dialog is hidden/disposed. However, even if the dialog is still visible, the current directory is printed to console in ~5 secs after the dialog is shown.
|