Index: javax/swing/plaf/basic/BasicLabelUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLabelUI.java,v retrieving revision 1.15 diff -u -r1.15 BasicLabelUI.java --- javax/swing/plaf/basic/BasicLabelUI.java 9 Aug 2005 16:11:55 -0000 1.15 +++ javax/swing/plaf/basic/BasicLabelUI.java 9 Aug 2005 18:14:39 -0000 @@ -176,21 +176,27 @@ String text = layoutCL(b, fm, b.getText(), icon, vr, ir, tr); if (icon != null) - icon.paintIcon(b, g, ir.x, ir.y); + 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.isEnabled()) paintEnabledText(b, g, text, tr.x, tr.y + fm.getAscent()); else paintDisabledText(b, g, text, tr.x, tr.y + fm.getAscent()); } + g.setFont(saved_font); } Index: javax/swing/plaf/basic/BasicTreeUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v retrieving revision 1.56 diff -u -r1.56 BasicTreeUI.java --- javax/swing/plaf/basic/BasicTreeUI.java 9 Aug 2005 16:11:55 -0000 1.56 +++ javax/swing/plaf/basic/BasicTreeUI.java 9 Aug 2005 18:14:40 -0000 @@ -2711,7 +2711,7 @@ if (tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) { if (!node.equals(mod.getRoot())) - drawCentered(tree, g, ei, indentation - rightChildIndent - 3, h); + ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); for (int i = 0; i < max; ++i) { @@ -2725,7 +2725,7 @@ } } else if (!node.equals(mod.getRoot())) - drawCentered(tree, g, ei, indentation - rightChildIndent - 3, + ci.paintIcon(tree, g, indentation - rightChildIndent - 3, descent - getRowHeight()); } Index: javax/swing/plaf/metal/MetalLookAndFeel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v retrieving revision 1.38 diff -u -r1.38 MetalLookAndFeel.java --- javax/swing/plaf/metal/MetalLookAndFeel.java 4 Aug 2005 18:16:17 -0000 1.38 +++ javax/swing/plaf/metal/MetalLookAndFeel.java 9 Aug 2005 18:14:40 -0000 @@ -44,6 +44,8 @@ import javax.swing.ImageIcon; import javax.swing.UIDefaults; +import javax.swing.border.Border; +import javax.swing.plaf.BorderUIResource; import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.FontUIResource; import javax.swing.plaf.IconUIResource; @@ -864,6 +866,8 @@ "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), + "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), + "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), Index: javax/swing/tree/DefaultTreeCellRenderer.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/tree/DefaultTreeCellRenderer.java,v retrieving revision 1.15 diff -u -r1.15 DefaultTreeCellRenderer.java --- javax/swing/tree/DefaultTreeCellRenderer.java 22 Jul 2005 08:11:12 -0000 1.15 +++ javax/swing/tree/DefaultTreeCellRenderer.java 9 Aug 2005 18:14:40 -0000 @@ -44,6 +44,7 @@ import java.awt.Graphics; import java.awt.Rectangle; +import javax.swing.border.Border; import javax.swing.Icon; import javax.swing.JLabel; import javax.swing.JTree; @@ -390,7 +391,7 @@ this.selected = selected; this.hasFocus = hasFocus; setHorizontalAlignment(LEFT); - setOpaque(true); + setOpaque(false); setVerticalAlignment(TOP); setEnabled(true); super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font")); @@ -399,13 +400,15 @@ { super.setBackground(getBackgroundSelectionColor()); setForeground(getTextSelectionColor()); + setBorder(UIManager.getLookAndFeelDefaults().getBorder("Tree.selectionBorder")); } else { super.setBackground(getBackgroundNonSelectionColor()); setForeground(getTextNonSelectionColor()); - } - + setBorder(UIManager.getLookAndFeelDefaults().getBorder("Tree.nonSelectionBorder")); + } + return this; }