harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chunrong Lai (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4976) [classlib][EIOffice]component on JTabbedPane sometimes invisible
Date Mon, 22 Oct 2007 09:40:50 GMT

    [ 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.


Mime
View raw message