-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.1, 1.1.2
-
None
-
x86, sparc
-
solaris_2.4, windows_nt
The functionality of hiding a FileDialog does not exist on Windows, but
does on Solaris;
For GUI-style reasons it may be justifiable to not allow a program to hide a
FileDialog after showing it (programmatically, without user interaction).
However, at the very least the behavior should be documented and consistent.
Here is a sample program to demonstrate the problem. This pops up a tiny Frame, and a FileDialog, then tries to hide the dialog; the hide() methods returns
'immediately' on both platforms, but on Solaris has the desired side-effect
of removing the dialog from the screen, and causing the show() method to return.
---------------
import java.awt.*;
public class F extends Thread {
public void run(){
System.err.println("calling show");
FD.show();
System.err.println("show returned");
}
public static void main(String[] args){
Frame f = new Frame("F");
f.add("Center",new Label("XXX"));
f.pack();
f.show();
FileDialog d = new FileDialog(f,"Pick a file");
F x = new F();
x.FD = d;
x.start();
try{Thread.sleep(5000);}catch(Exception e){}
System.err.println("Calling hide");
d.hide();
System.err.println("hide returned");
}
FileDialog FD;
}
does on Solaris;
For GUI-style reasons it may be justifiable to not allow a program to hide a
FileDialog after showing it (programmatically, without user interaction).
However, at the very least the behavior should be documented and consistent.
Here is a sample program to demonstrate the problem. This pops up a tiny Frame, and a FileDialog, then tries to hide the dialog; the hide() methods returns
'immediately' on both platforms, but on Solaris has the desired side-effect
of removing the dialog from the screen, and causing the show() method to return.
---------------
import java.awt.*;
public class F extends Thread {
public void run(){
System.err.println("calling show");
FD.show();
System.err.println("show returned");
}
public static void main(String[] args){
Frame f = new Frame("F");
f.add("Center",new Label("XXX"));
f.pack();
f.show();
FileDialog d = new FileDialog(f,"Pick a file");
F x = new F();
x.FD = d;
x.start();
try{Thread.sleep(5000);}catch(Exception e){}
System.err.println("Calling hide");
d.hide();
System.err.println("hide returned");
}
FileDialog FD;
}
- duplicates
-
JDK-4044979 can't hide FileDialog on Windows95
-
- Closed
-