2005-08-17 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/plaf/basic/BasicLabelUI.java
(paint): Don't fill the background here. If the label is opaque
then the background is filled in ComponentUI.update(), otherwise
it must not be touched.
/Roman
Index: javax/swing/plaf/basic/BasicLabelUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLabelUI.java,v
retrieving revision 1.16
diff -u -r1.16 BasicLabelUI.java
--- javax/swing/plaf/basic/BasicLabelUI.java 9 Aug 2005 18:18:44 -0000 1.16
+++ javax/swing/plaf/basic/BasicLabelUI.java 17 Aug 2005 08:31:20 -0000
@@ -177,20 +177,12 @@
if (icon != null)
icon.paintIcon(b, g, ir.x, ir.y);
- if (text != null && !text.equals(""))
- {
- g.setColor(b.getBackground());
- if (b.isOpaque())
- g.fillRect(vr.x, vr.y, vr.width, vr.height);
- else
- {
- g.fillRect(tr.x, tr.y, tr.width, tr.height);
- if (b.getBorder() != null)
- b.getBorder().paintBorder(b, g, tr.x, tr.y, tr.width, tr.height);
- b.setBorder(null);
- }
+ if (b.getBorder() != null)
+ b.getBorder().paintBorder(b, g, tr.x, tr.y, tr.width, tr.height);
+ if (text != null && !text.equals(""))
+ {
if (b.isEnabled())
paintEnabledText(b, g, text, tr.x, tr.y + fm.getAscent());
else
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches