JOptionPane and keyboard navigation
I just discovered something that seems like a bug with JOptionPane.
If I pop up a simple
JOptionPane.showConfirmDialog
(...JOptionPane.YES_NO_CANCEL_OPTION...);
I get the expected option pane with the focus rectangle on
the leftmost ("Yes") button. Hit tab once, and the focus
moves right to the middle ("No") button. Hit return, and
the option pane dismisses, and returns 0
(JOptionPane.YES_OPTION). Same thing happens if I tab
focus to the cancel button.
If I use the mouse to actually click the button, I get the expected
result. Is this a bug?
I'm using
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
TIA,
-Dave
|