Some time ago I committed a patch that made the textIconGap not be
adjusted in SwingUtilities.layoutCompoundLabel when icon == null.
However, this caused some regressions in our testsuite. I remember that
I did this for an application which uses the textIconGap for some label
layout adjustment even when icon == null, but maybe this doesn't even
work with newer JDKs. This application was coded for JDK1.1 Swing. I'll
reinvestigate that.
2006-02-28 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/SwingUtilities.java
(layoutCompoundLabel): Set textIconGap to 0 when icon == null.
/Roman
Index: javax/swing/SwingUtilities.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
retrieving revision 1.45
diff -u -r1.45 SwingUtilities.java
--- javax/swing/SwingUtilities.java 27 Feb 2006 13:16:43 -0000 1.45
+++ javax/swing/SwingUtilities.java 28 Feb 2006 15:11:23 -0000
@@ -811,6 +811,7 @@
if (icon == null)
{
+ textIconGap = 0;
iconR.width = 0;
iconR.height = 0;
}