-
Bug
-
Resolution: Fixed
-
P1
-
1.1.6
-
1.1.6
-
x86
-
windows_nt
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2020030 | 1.2.0 | Robi Khan | P1 | Closed | Fixed | 1.2beta4 |
JDK-2020029 | 1.1.7 | Robi Khan | P1 | Resolved | Fixed | b01 |
JDK1.1.6L, AWT Core, Regression
Short description:
---------------------
When invoked from a Dialog, FileDialog does not return from show() until
focus changes, a key is pressed, or the mouse re-enters the calling
dialog.
This is a bad regression for JBuilder, as many of our PropertyEditors call
out to a FileDialog, and JBuilder appears as if it is locked-up until the user
clicks on a different application window.
Steps/Code:
---------------
Use the following code to show the bug (instructions embedded in the
code).
import java.awt.*;
import java.awt.event.*;
public class HangingFiler extends Dialog {
public HangingFiler(Frame frame) {
super(frame, "HangingFiler Dialog");
setLayout(new BorderLayout());
Button b = new Button();
b.setLabel("click to invoke FileDialog");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
FileDialog fd = new FileDialog((Frame)getParent());
System.out.println("- Showing FileDialog. Select any file and click
OK.");
System.out.println(" - Show will not return until focus changes, a
key is typed,");
System.out.println(" or the mouse enters the HangingFiler
dialog...");
fd.show();
System.out.println(" - Show returned. File=" + fd.getDirectory() +
fd.getFile());
}
});
add(b, BorderLayout.CENTER);
}
public final static void main(String[] args) {
HangingFiler hf = new HangingFiler(new Frame());
hf.setBounds(400, 400, 300, 100);
hf.show();
}
}
Short description:
---------------------
When invoked from a Dialog, FileDialog does not return from show() until
focus changes, a key is pressed, or the mouse re-enters the calling
dialog.
This is a bad regression for JBuilder, as many of our PropertyEditors call
out to a FileDialog, and JBuilder appears as if it is locked-up until the user
clicks on a different application window.
Steps/Code:
---------------
Use the following code to show the bug (instructions embedded in the
code).
import java.awt.*;
import java.awt.event.*;
public class HangingFiler extends Dialog {
public HangingFiler(Frame frame) {
super(frame, "HangingFiler Dialog");
setLayout(new BorderLayout());
Button b = new Button();
b.setLabel("click to invoke FileDialog");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
FileDialog fd = new FileDialog((Frame)getParent());
System.out.println("- Showing FileDialog. Select any file and click
OK.");
System.out.println(" - Show will not return until focus changes, a
key is typed,");
System.out.println(" or the mouse enters the HangingFiler
dialog...");
fd.show();
System.out.println(" - Show returned. File=" + fd.getDirectory() +
fd.getFile());
}
});
add(b, BorderLayout.CENTER);
}
public final static void main(String[] args) {
HangingFiler hf = new HangingFiler(new Frame());
hf.setBounds(400, 400, 300, 100);
hf.show();
}
}
- backported by
-
JDK-2020029 FileDialog.show does not return until event generated
- Resolved
-
JDK-2020030 FileDialog.show does not return until event generated
- Closed
- relates to
-
JDK-4122683 hiding modal Dialog on NT can deadlock, freezing GUI
- Closed