Ok,
I revert this and look for another way to resolve this.

Thanks Mark for finding this!

@Roman: The doc for setSelectedComponent() says it does the hiding and showing
of the old and new selected component. However I saw no code in that method
which does it. That is why I thought it should be added here. Please add notes
to code which relies on a certain behavior of the UI.

cya
Robert

Mark Wielaard wrote:
> Hi Robert,
> 
> On Tue, 2006-07-25 at 21:21 +0200, Robert Schuster wrote:
> 
>>Hi,
>>this patch fixes some minor JTabbedPane issues.
>>
>>2006-07-25  Robert Schuster <[EMAIL PROTECTED]>
>>
>>        * javax/swing/JTabbedPane.java:
>>        (remove(Component)): Rewritten.
>>        (setSelectedIndex): Implemented updating of component visibility 
>> state.
> 
> 
> This seems to revert part of a patch from Roman:
> 
> 2006-06-09  Roman Kennke  <[EMAIL PROTECTED]>
> 
>     * javax/swing/JTabbedPane.java
>     (setSelectedIndex): Don't change the visibility of the components,
>     this is done by the UI class.
>     * javax/swing/plaf/basic/BasicTabbedPaneUI.java
>     (TabbedPaneLayout.layoutContainer): Change visibility of component
>     here, depending on the selected index. Only do this if the new
>     selected component is not null. Some programs seem to expect
>     this.
>     (visibleComponent): New field.
>     (getVisibleComponent): Changed to return visibleComponent field.
>     (setVisibleComponent): Changed to set the visibility of
>     the old and new visible component.
> 
> And it does indeed seem to break the showcase application Roman posted
> about: http://kennke.org/blog/?p=9
> 
> Could you coordinate on a correct fix?
> 
> Thanks,
> 
> Mark
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to