[5330] in java-interest
More complaints about FileDialog
daemon@ATHENA.MIT.EDU (Per Danvind)
Tue Feb 6 06:11:19 1996
To: java-interest@java.sun.com
Date: Thu, 01 Feb 1996 10:08:31 +0100
From: Per Danvind <perry@maison.campus.luth.se>
I just ran my testprogram for FileDialog with JDK 1.0. I was very
disappointed to see that it behaved just like in JDK beta2. The
dialog shows, but is all gray with some darker shade where the
scrollbars should be. No text, no buttons, no scrollbars...
The testprogram worked fine with JDK beta1, and I have checked the
source, and there are no changes in FileDialog since JDK beta1.
I use Solaris 2.4 on a SPARC.
If the program should work for anyone else using the same setup,
please tell me.
--
Per
Here is the testprogram.
-------------------------------------------------------
import java.awt.*;
public class FDTest {
public static void main(String args[]) {
// Create a frame for the dialog to popup in.
Frame f = new Frame("Dummy frame for FileDialog");
f.resize(150, 50);
// It is important that it shows first.
f.show();
FileDialog fd = new FileDialog(f, "This text doesn't show anywhere",
FileDialog.LOAD);
fd.show();
// getFile() will return the selected file and close the dialog.
String file = fd.getFile();
// Might have pressed cancel...
if(file!=null)
System.out.println("You chose the file '"+file+"'");
// Destroy the dummy frame and exit.
f.dispose();
System.exit(0);
}
}
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com