Hi Tania,

The JTree change looks ok. Only some remark about the BasicToolBarUI one:

Index: javax/swing/plaf/basic/BasicToolBarUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicToolBarUI.java,v
retrieving revision 1.28
diff -u -r1.28 BasicToolBarUI.java
--- javax/swing/plaf/basic/BasicToolBarUI.java  26 Jul 2006 13:39:39 -0000      
1.28
+++ javax/swing/plaf/basic/BasicToolBarUI.java  21 Aug 2006 18:47:10 -0000
@@ -898,7 +898,10 @@
        b.setRolloverEnabled(false);
// Save old border in hashtable.
-        borders.put(b, b.getBorder());
+        if (b.getBorder() == null)
+          borders.put(b, b.getInsets());
+        else
+          borders.put(b, b.getBorder());
b.setBorder(nonRolloverBorder);
       }

I'd not store the insets in the border table. However, we might want to check if it's an UIResource and only store custom borders in the table:

Border b = borders.get(b);
if (b == null || b instanceof UIResource)
  borders.put(b, b.getBorder());

And later when putting the border back in place, check if there actually is a border in the table, and only reinstall the border when there's a non-null entry.


Dunno if that's the problem. Maybe you could explain a little more what the problem here was. However, storing an Insets object seems confusing and not quite right. The borders table is there to store the original border of toolbar components, and install them back when the components get removed from the toolbar. You can't install an Insets object as Border...

/Roman

Reply via email to