Made this fix because there were several problems when the layout mode
was set to SCROLLING. There are still some problems I am working on.

2005-11-09  Lillian Angel  <[EMAIL PROTECTED]>

        * javax/swing/JTabbedPane.java
        (setComponent): Added check to prevent infinite loops.
        * javax/swing/plaf/metal/MetalTabbedPaneUI.java
        (createLayoutManager): Should call super here, so the layout
        is set properly depending on the layout mode.

Index: javax/swing/JTabbedPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v
retrieving revision 1.22
diff -u -r1.22 JTabbedPane.java
--- javax/swing/JTabbedPane.java	19 Oct 2005 15:45:04 -0000	1.22
+++ javax/swing/JTabbedPane.java	9 Nov 2005 16:48:30 -0000
@@ -337,9 +337,12 @@
      */
     public void setComponent(Component c)
     {
+      if (c != null)
+        {
           remove(component);
           this.component = c;
           add(c);
+        }
     }
 
     /**

Index: javax/swing/plaf/metal/MetalTabbedPaneUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,v
retrieving revision 1.9
diff -u -r1.9 MetalTabbedPaneUI.java
--- javax/swing/plaf/metal/MetalTabbedPaneUI.java	27 Oct 2005 09:50:58 -0000	1.9
+++ javax/swing/plaf/metal/MetalTabbedPaneUI.java	9 Nov 2005 16:48:30 -0000
@@ -127,7 +127,7 @@
    */
   protected LayoutManager createLayoutManager()
   {
-    return new TabbedPaneLayout();
+    return super.createLayoutManager();
   }
   
   /**
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to