It seems that BasicLabelUI must not set the border of JLabel, although there is an entry for that in BasicLookAndFeels' UIDefaults. At least I have an application here that shows strange effects with JLabel border set by default.

2005-06-29  Roman Kennke  <[EMAIL PROTECTED]>

       * javax/swing/plaf/basic/BasicLabelUI.java
       (installDefaults): Do not set the border here.
       (uninstallDefaults): Do not unset the border here.

/Roman

Index: javax/swing/plaf/basic/BasicLabelUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLabelUI.java,v
retrieving revision 1.11
diff -u -r1.11 BasicLabelUI.java
--- javax/swing/plaf/basic/BasicLabelUI.java    22 Jun 2005 15:05:34 -0000      
1.11
+++ javax/swing/plaf/basic/BasicLabelUI.java    29 Jun 2005 14:42:07 -0000
@@ -350,7 +350,6 @@
     c.setForeground(defaults.getColor("Label.foreground"));
     c.setBackground(defaults.getColor("Label.background"));
     c.setFont(defaults.getFont("Label.font"));
-    c.setBorder(defaults.getBorder("Label.border"));
     //XXX: There are properties we don't use called disabledForeground
     //and disabledShadow.
   }
@@ -366,7 +365,6 @@
     c.setForeground(null);
     c.setBackground(null);
     c.setFont(null);
-    c.setBorder(null);
   }
 
   /**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to