RFR: 6318027: BasicScrollBarUI does not disable timer when enclosing frame is disabled. [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Mon Aug 19 02:32:58 UTC 2024
On Fri, 16 Aug 2024 23:36:46 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Stop the timer if frame is disabled
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java line 1618:
>
>> 1616: if (parent instanceof javax.swing.JFrame par) {
>> 1617: if (!par.isEnabled()) {
>> 1618: ((Timer)e.getSource()).stop();
>
> Is the "TImer" always the source for the event?
Yes, the method employs same way to stop the timer in other cases too..
Also, if the scrollbar is made invisible and then visible instead of frame, it doesn't scroll to the end and behaves as expected..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20346#discussion_r1721146970
More information about the client-libs-dev
mailing list