Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > JOptionPane and keyboard navigation
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 2nd November 18:16
dave schaumann
External User
 
Posts: 1
Default 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
  Reply With Quote


 


2 2nd November 18:16
znôrt
External User
 
Posts: 1
Default JOptionPane and keyboard navigation



It is normal. Hiting return causes the default action to trigger
(which happens to be OK). Hit spacebar instead.

znôrt
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666