RFR: 6318027: BasicScrollBarUI does not disable timer when enclosing frame is disabled. [v5]

Abhishek Kumar abhiscxk at openjdk.org
Tue Aug 20 06:42:52 UTC 2024


On Tue, 20 Aug 2024 06:34:29 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java line 1617:
>> 
>>> 1615:             do {
>>> 1616:                 if (parent instanceof javax.swing.JFrame par) {
>>> 1617:                     if (!par.isEnabled()) {
>> 
>> I think this two condition can be combined into one.
>> 
>> `if (parent instanceof javax.swing.JFrame par && !par.isEnabled())
>> `
>
> No, we need to break if frame is enabled and not look for its parent..

ok.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20346#discussion_r1722767220


More information about the client-libs-dev mailing list