-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta3
-
x86
-
windows_nt
-
Verified
Name: biR10147 Date: 08/31/2001
When JOptionPane.showMessageDialog() is invoked, "OK" button doesn't have a focus. Clicking on "Tab", however, gives the focus to the button, and from now on focus traverses correctly. This is a regression. In beta2-b78 focus sets correctly.
To reproduce it, compile and run the test case below:
===================================================
import java.awt.Frame;
import javax.swing.JOptionPane;
public class FocusTest extends Frame {
public FocusTest() {
JOptionPane.showMessageDialog(null, "Does the button have a focus?",
"Am I focused?", JOptionPane.QUESTION_MESSAGE);
}
public static void main(String[] args) {
(new FocusTest()).setVisible(true);
}
}
===================================================
On Solaris everything behaves correctly.
###@###.###
Workaround: Traverse focus manually or programmatically after showing a modal dialog.
###@###.###
======================================================================