-
Bug
-
Resolution: Not an Issue
-
P4
-
6u20-rev, 7
-
None
-
x86, sparc
-
solaris_10, windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2194391 | 6-pool | Vladislav Karnaukhov | P3 | Closed | Not an Issue |
The problem was originally reported here:
http://forums.java.net/jive/thread.jspa?messageID=366737
THE PROBLEM:
Closing modal dialog doesn't activate its owner.
HOW TO REPRODUCE:
Compile and run the testcase below.
1. Two frames and one dialog will appear. Make sure the dialog is focused.
2. Alt-tab to the frame "f0".
3. Alt-Tab to the dialog again.
4. Close the dialog.
EXPECTED BEHAVIOR:
The frame "f1" (the owner of the dialog) gets activated.
ACTUAL BEHAVIOR:
The previously active frame "f0" gets activated.
Note that this works fine on Linux.
=======================================================================
import java.awt.*;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JFrame f0 = new JFrame("f0");
JFrame f1 = new JFrame("f1");
JDialog d = new JDialog(f1);
d.setModalityType(JDialog.ModalityType.DOCUMENT_MODAL);
f0.add(new JButton("frame0"));
f1.add(new JButton("frame1"));
d.add(new JButton("dialog"));
f1.setLocation(200, 0);
d.setLocation(0, 200);
f0.pack();
f1.pack();
d.pack();
f0.setVisible(true);
f1.setVisible(true);
d.setVisible(true);
}
}
=======================================================================
http://forums.java.net/jive/thread.jspa?messageID=366737
THE PROBLEM:
Closing modal dialog doesn't activate its owner.
HOW TO REPRODUCE:
Compile and run the testcase below.
1. Two frames and one dialog will appear. Make sure the dialog is focused.
2. Alt-tab to the frame "f0".
3. Alt-Tab to the dialog again.
4. Close the dialog.
EXPECTED BEHAVIOR:
The frame "f1" (the owner of the dialog) gets activated.
ACTUAL BEHAVIOR:
The previously active frame "f0" gets activated.
Note that this works fine on Linux.
=======================================================================
import java.awt.*;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JFrame f0 = new JFrame("f0");
JFrame f1 = new JFrame("f1");
JDialog d = new JDialog(f1);
d.setModalityType(JDialog.ModalityType.DOCUMENT_MODAL);
f0.add(new JButton("frame0"));
f1.add(new JButton("frame1"));
d.add(new JButton("dialog"));
f1.setLocation(200, 0);
d.setLocation(0, 200);
f0.pack();
f1.pack();
d.pack();
f0.setVisible(true);
f1.setVisible(true);
d.setVisible(true);
}
}
=======================================================================
- backported by
-
JDK-2194391 Owner frame should be activated on closing a modal dialog.
-
- Closed
-
- relates to
-
JDK-6262392 Problem with dismissing dialogs on CDE with XToolkit
-
- Closed
-