[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 8259687: JTabbedPane.setComponentAt doesn't hide previously visible tab component [v2]
From:       Harshitha Onkar <honkar () openjdk ! org>
Date:       2022-07-30 0:29:54
Message-ID: yElNBRXFSX1iOiSD-kGyYgGGl2zaDV8cLC_OHO9W8Ug=.96604f59-2f41-4b0d-82c9-a9089f5d5b3c () github ! com
[Download RAW message or body]

On Fri, 29 Jul 2022 11:35:45 GMT, Prasanta Sadhukhan <psadhukhan@openjdk.org> wrote:

> > Harshitha Onkar has updated the pull request incrementally with one additional \
> > commit since the last revision: 
> > bug id changed, added isVisible check
> 
> src/java.desktop/share/classes/javax/swing/JTabbedPane.java line 1603:
> 
> > 1601:                 if (this.visComp != null &&
> > 1602:                         !this.visComp.equals(component)) {
> > 1603:                     // previous component visibility is set to false
> 
> It seems `isVisible` is checked before changing the visibility..Should we do it \
> here too?

I thought it might be redundant since the setVisible() checks for visibility of \
component within show() and hide(). But to add clarity I have add `isVisible` check.

> test/jdk/javax/swing/JTabbedPane/TabbedPaneBug.java line 35:
> 
> > 33: /*
> > 34:  * @test
> > 35:  * @bug 8265586
> 
> bugid wrong

Updated

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

PR: https://git.openjdk.org/jdk/pull/9681


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic