The save dialog on Solaris doesn't show the filename.
On NT it does.
The description field as copied from bug report 1185153 follows:
FileDialog picks up the directory name part, but not the
file name part, of the default file name in a FileDialog
The description field as copied from bug report 1228074 follows:
FileDialog.setFile(string) doestn set the filename given in the dialog.
Run the following code after changing the dirstr and filestr appropriately to some
directory and file.
public class TestFileDialog extends Applet {
FileDialog fd;
Frame frame;
String dirstr = new String("/usr/green/SCCS_DIRECTORIES/java/src/share/test/awt/");
String filestr = new String("AddRemoveTest.java");
public TestFileDialog() {
frame = new Frame("AppletFrame");
fd = new FileDialog(frame, "FileDialog");
frame.resize(100, 100);
frame.add("Center", fd);
frame.show();
}
public TestFileDialog(Frame f) {
fd = new FileDialog(f, "FileDialog");
}
public void init() {
fd.setDirectory(dirstr);
fd.setFile(filestr);
fd.show();
}
public static void main(String argv[]) {
Frame f = new Frame("TestFD");
TestFileDialog tfd = new TestFileDialog(f);
f.resize(200, 200);
f.add("Center", tfd);
f.show();
tfd.init();
tfd.start();
}
}
On NT it does.
The description field as copied from bug report 1185153 follows:
FileDialog picks up the directory name part, but not the
file name part, of the default file name in a FileDialog
The description field as copied from bug report 1228074 follows:
FileDialog.setFile(string) doestn set the filename given in the dialog.
Run the following code after changing the dirstr and filestr appropriately to some
directory and file.
public class TestFileDialog extends Applet {
FileDialog fd;
Frame frame;
String dirstr = new String("/usr/green/SCCS_DIRECTORIES/java/src/share/test/awt/");
String filestr = new String("AddRemoveTest.java");
public TestFileDialog() {
frame = new Frame("AppletFrame");
fd = new FileDialog(frame, "FileDialog");
frame.resize(100, 100);
frame.add("Center", fd);
frame.show();
}
public TestFileDialog(Frame f) {
fd = new FileDialog(f, "FileDialog");
}
public void init() {
fd.setDirectory(dirstr);
fd.setFile(filestr);
fd.show();
}
public static void main(String argv[]) {
Frame f = new Frame("TestFD");
TestFileDialog tfd = new TestFileDialog(f);
f.resize(200, 200);
f.add("Center", tfd);
f.show();
tfd.init();
tfd.start();
}
}
- duplicates
-
JDK-1259400 FileDialog.setFile() seems broken on Solaris. Also start working directory...
- Closed