<Swing Dev> [14] RFR : JDK-8226892 : ActionListeners on JRadioButtons don't get notified when selection is changed with arrow keys
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Oct 9 01:48:38 UTC 2019
+1
On 9/30/19 12:59 am, Ambarish Rapte wrote:
> Hi,
>
> Please review this bug fix:
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8226892
>
> Webrev: http://cr.openjdk.java.net/~arapte/a11y/8226892/webrev.00/
>
> Issue:
>
> When a JRadioButton is selected using arrow key, the ActionListener of the JRadioButton does not get invoked.
>
> Cause & Fix:
>
> When a JRadioButton is selected using space key. Key press and release events are processed separately. The ActionListener is invoked on release key event received after the key press event.
>
> The support for selection of JRadioButton using arrow keys was implemented for JDK-8033699. This functionality only selects and requests focus on JRadioButton when an arrow key is typed but does not invoke the calls for press and release event. Webrev.00 fixes this issue.
>
> Verification:
>
> Verified that ItemListener, ChangeListener, FocusListener, ActionListener and KeyListener are invoked correctly when a JRadioButton is selected using arrow key and added a regression test. No JRadioButton test fails with the fix.
>
> Regards,
>
> Ambarish
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list