<Swing Dev> [14] RFR JDK-8223788 - [macos] JSpinner buttons in JColorChooser dialog may capture focus using TAB Key

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Jan 13 06:46:43 UTC 2020


Looks fine.

On 1/12/20 10:32 pm, Tejpal Rebari wrote:
> Hi Sergey,
> 
>> On 13-Jan-2020, at 1:15 AM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com <mailto:Sergey.Bylokhov at oracle.com>> wrote:
>>
>> Hi, Tejpal
>>
>> Small note that "editor2.getTextField().isFocusOwner()" should be called on EDT, it is a Swing component.
> 
> I have modified the test.
> webrev : http://cr.openjdk.java.net/~trebari/swing/8223788/webrev3/
> 
> regards
> Tejpal
> 
>>
>> On 1/10/20 1:32 am, Tejpal Rebari wrote:
>>> Hi Sergey,
>>> I had removed the colorchooser and created a frame and added two spinner to it.
>>> Then noticed that the issue is reproducible only when the ContainerOrderFocusTraversalPolicyis set.
>>> WhenContainerOrderFocusTraversalPolicy is set, in JSpinner there are four components which captures focus
>>> 1)JSpinner
>>> 2)JSpinner$NumberEditor
>>> 3)JFormattedTextField
>>> 4)AquaSpinnerUI$SpinPainter
>>> In JColorChooser, SlidingSpinner is used which sets focusable property to false for1)JSpinner and 2)JSpinner$NumberEditor
>>> So in the test I usedContainerOrderFocusTraversalPolicy and set the focusable property false for 1)JSpinner and 2)JSpinner$NumberEditor and then check that the spinpainter is capturing focus or not.
>>> Here is the updated webrev:http://cr.openjdk.java.net/~trebari/swing/8223788/webrev2/
>>> Regards
>>> Tejpal
>>
>>
>> -- 
>> Best regards, Sergey.
> 


-- 
Best regards, Sergey.


More information about the swing-dev mailing list