-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
P4
-
None
-
Affects Version/s: 1.1
-
Component/s: client-libs
-
sparc
-
solaris_2.5
Run the program below using JDK1.1 under win95 or NT4.0b2. It will
pop-up a FileDialog. Notice the selected directory is that of the working
directory of the program, not "\\tmp"
===================
iimport java.awt.*;
class Main {
public static void main(String argv[]) {
Frame f = new Frame("Mumble");
Panel p = new Panel();
f.add(p);
f.setLayout(new GridBagLayout());
f.resize(600, 450);
f.show();
FileDialog d = new FileDialog(f, "Something", FileDialog.SAVE);
d.setDirectory("\\tmp");
d.setFile("12.foo");
d.show();
String fn = d.getFile();
String dn = d.getDirectory();
System.err.println("Got a filename of "+fn+" and a directory of "+dn);
}
}
pop-up a FileDialog. Notice the selected directory is that of the working
directory of the program, not "\\tmp"
===================
iimport java.awt.*;
class Main {
public static void main(String argv[]) {
Frame f = new Frame("Mumble");
Panel p = new Panel();
f.add(p);
f.setLayout(new GridBagLayout());
f.resize(600, 450);
f.show();
FileDialog d = new FileDialog(f, "Something", FileDialog.SAVE);
d.setDirectory("\\tmp");
d.setFile("12.foo");
d.show();
String fn = d.getFile();
String dn = d.getDirectory();
System.err.println("Got a filename of "+fn+" and a directory of "+dn);
}
}