United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4226243 Require ability to navigate within groups of buttons using arrow keys
JDK-4226243 : Require ability to navigate within groups of buttons using arrow keys

Details
Type:
Enhancement
Submit Date:
1999-04-02
Status:
Open
Updated Date:
2013-05-17
Project Name:
JDK
Resolved Date:
Component:
client-libs
OS:
solaris_2.4,solaris_2.6,windows_nt,solaris_2.5.1,generic,windows_xp,windows_2000
Sub-Component:
javax.swing
CPU:
x86,sparc,unknown,generic
Priority:
P4
Resolution:
Unresolved
Affected Versions:
1.1.6,1.2.0,1.3.0,1.4.0,5.0,6
Targeted Versions:

Related Reports
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

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
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
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

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

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



Hardware and Software, Engineered to Work Together