On Tue, 12 Jan 2021 05:52:33 GMT, Pankaj Bansal <pban...@openjdk.org> wrote:
>>> I did not add radio button to spec as RadioButton are also ToggleButton >>> only. But yes, I will highlight that. So I will update the spec as below. >>> Hope that is ok. >>> * Find the new toggle/radio button that focus needs to be >>> * moved to in the group, select the button >> >> Also please add a comment of why we need to use the setPressed/setArmed it >> seems unrelated to the selection of the button, and is not described >> anywhere. > >> > I did not add radio button to spec as RadioButton are also ToggleButton >> > only. But yes, I will highlight that. So I will update the spec as below. >> > Hope that is ok. >> > >> > * Find the new toggle/radio button that focus needs to be >> > * moved to in the group, select the button >> >> Also please add a comment of why we need to use the setPressed/setArmed it >> seems unrelated to the selection of the button, and is not described >> anywhere. > > Done, please have a look. Just small summary info for the future: we have a JToggleButton class and two subclasses: JCheckBox and JRadioButton. 1. It was decided(but not strictly specified) to generate an action when the selection is changed by the arrow keys for JRadioButton. It is just common sense. 2. It was decided to not generate an action when the selection is changed by arrow keys for JCheckBox. Since the user should have the ability to move over different checkboxes without toggling them. 3. The parent class JToggleButton is a root cause of the current bug under discussion. We could implement it in any way, we can generate an action when the user presses the arrow key, but the opposite just a safer solution now. ------------- PR: https://git.openjdk.java.net/jdk16/pull/99