You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chunrong Lai (JIRA)" <ji...@apache.org> on 2007/10/22 11:40:50 UTC

[jira] Commented: (HARMONY-4976) [classlib][EIOffice]component on JTabbedPane sometimes invisible

    [ https://issues.apache.org/jira/browse/HARMONY-4976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536612 ] 

Chunrong Lai commented on HARMONY-4976:
---------------------------------------


 I found the cause of this issue.
    //swing/src/main/java/common/javax/swing/plaf/basic/BasicTabbedPaneUI.java
    protected void setVisibleComponent(final Component component) {
        Component oldVisible = getVisibleComponent();
        if (oldVisible == component) {
            return;      
            //Please notice that we have a stale oldVisible even after removeAll
            //So if we set the same component to visible again it just quit 
            //This makes setVisibleComponent does nothing
        }
        ......
 
  There are two methods to fix the issue:
  (1) JTabbedPane.removeall() needs clear the BasicTabbedPaneUI.visibleComponent to null.
        This needs add the field into TabbedPaneUI (public TabbedPaneUI getUI()).
         Of course we need more code change here.
 (2) Just comment the optimization of    if (oldVisible == component) return;
       This may lead to some performance overhead in some typical cases.
        
  

> [classlib][EIOffice]component on JTabbedPane sometimes invisible
> ----------------------------------------------------------------
>
>                 Key: HARMONY-4976
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4976
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: windows xp sp2
>            Reporter: evermore
>         Attachments: TabbedPane.jar
>
>
> after invoke removeAll,add component to JTabbedPane again will make it invisible

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.