On Mon, 11 Nov 2024 13:01:55 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> Damon Nguyen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Add space
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
> line 1244:
>
>> 1242: } else if (decrButton.isFocusPainted()) {
>> 1243: decrButton.doClick();
>> 1244: }
>
> Why this doClick block is required?
The scrollbar increase and decrease buttons stay visually clicked down. Trying
to change `setFocusPainted` or `setSelected` didn't seem to resolve this.
However, adding a `doClick` resolves it and doesn't seem to interfere with the
positioning of the scrolled item.
To be sure, I ran this on CI on all OS's and I didn't run into an issue. I'm
open to other suggestions for fixing this visually, but this seemed like the
cleanest way to do so.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20845#discussion_r1838526372