JDK-4226243 : Require ability to navigate within groups of buttons using arrow keys
  • Type: Enhancement
  • Status: Open
  • Resolution: Unresolved
  • Component: client-libs
  • Sub-Component: javax.swing
  • Priority: P4
  • Affected Version: 1.1.6,1.2.0,1.3.0,1.4.0,5.0,6
  • OS:
    generic,solaris_2.4,solaris_2.5.1,solaris_2.6,windows_nt,windows_2000,windows_xp generic,solaris_2.4,solaris_2.5.1,solaris_2.6,windows_nt,windows_2000,windows_xp
  • CPU: generic,unknown,x86,sparc
  • Submit Date: 1999-04-02
  • Updated Date: 2017-05-23
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
There are many places within Swing where we should have the ability to navigate within groups of buttons using the arrow keys. The ones that come to mind are:

Groups of JRadioButtons
JOptionPane buttons
Potentially, within any ButtonGroup (perhaps with API to turn it on)

We need to implement something that provides this behavior. We need to apply it to JOptionPane by default, and possibly groups of JRadioButtons.

Original description below
---
This behaviour was observed in SwingSet so I don't know if its a demo application problem or JRadioButton problem. In SwingSet the radio buttons are visually and operationally (click one, a checked one unclicks) grouped together but the only way I can navigate this set is by tab navigation. In a group, tab navigation should move focus into and out of the group and the arrow keys should move the focus within the group.
###@###.### 2005-03-30 17:07:17 GMT

Comments
Not reproducible on 8u40b17
2014-12-17

EVALUATION Low priority bug - decommitted from JDK7
2011-01-26

EVALUATION It is unlikely we'll fix it for the core Swing components but there is a useful component which provides the requested functionality please the JXButtonPanel from the https://swinghelper.dev.java.net/
2007-05-04

EVALUATION The fix for this bug was the cause of several regressions it is decided to wait AWT to provide a good and safe solution the fix was rollbacked and recommited to Dophin
2005-09-13

EVALUATION We unfortunatly didn't design this with arrow key navigation in mind. We do want to implement this, however. --------------------- This is worthy of an investigation. The result may be an article / documentation on how to implement the desired behavior or a new JComponent that groups other components. It should be said that the problem is not with ButtonGroup, which was simply designed to enforce logic between the models of multiple buttons. ###@###.### 2001-11-14 ###@###.###, made an attempt at fixing this via ButtonGroup some time ago. The fix was never reviewed, but may provide a great place to start. See: http://sa.sfbay.sun.com/projects/swing_data/tiger/4104452.0 ###@###.###'s comments, accompanying this e-mail are included in the comments section of this report. ###@###.### 2005-03-30 17:16:47 GMT
2004-09-28