This patch (committed) sets the default value for the textIconGap field, which makes things look better:

2006-09-12  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/AbstractButton.java
        (AbstractButton): Initialise textIconGap field.

I have some Mauve tests to cover this.

Regards,

Dave
Index: javax/swing/AbstractButton.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/AbstractButton.java,v
retrieving revision 1.66
diff -u -r1.66 AbstractButton.java
--- javax/swing/AbstractButton.java     22 Aug 2006 11:23:56 -0000      1.66
+++ javax/swing/AbstractButton.java     12 Sep 2006 08:43:20 -0000
@@ -904,6 +904,10 @@
     setDisplayedMnemonicIndex(-1);
     setOpaque(true);
     text = "";
+    // testing on JRE1.5 shows that the iconTextGap default value is 
+    // hard-coded here and the 'Button.iconTextGap' setting in the 
+    // UI defaults is ignored, at least by the MetalLookAndFeel
+    iconTextGap = 4;
     updateUI();
   }
 

Reply via email to