Index: javax/swing/plaf/basic/BasicButtonUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicButtonUI.java,v retrieving revision 1.26 diff -u -r1.26 BasicButtonUI.java --- javax/swing/plaf/basic/BasicButtonUI.java 15 Sep 2005 20:24:14 -0000 1.26 +++ javax/swing/plaf/basic/BasicButtonUI.java 20 Sep 2005 09:47:42 -0000 @@ -132,6 +132,7 @@ b.setIconTextGap(defaults.getInt(prefix + "textIconGap")); b.setInputMap(JComponent.WHEN_FOCUSED, (InputMap) defaults.get(prefix + "focusInputMap")); + b.setRolloverEnabled(defaults.getBoolean(prefix + "rollover")); b.setOpaque(true); } @@ -408,15 +409,15 @@ if (b.isEnabled()) { - g.setColor(b.getForeground()); - g.drawString(text, textRect.x, textRect.y + fm.getAscent()); + g.setColor(b.getForeground()); + g.drawString(text, textRect.x, textRect.y + fm.getAscent()); } else { - g.setColor(b.getBackground().brighter()); - g.drawString(text, textRect.x, textRect.y + fm.getAscent()); - g.setColor(b.getBackground().darker()); - g.drawString(text, textRect.x + 1, textRect.y + fm.getAscent() + 1); + UIDefaults defaults = UIManager.getLookAndFeelDefaults(); + String prefix = getPropertyPrefix(); + g.setColor(defaults.getColor(prefix + "disabledText")); + g.drawString(text, textRect.x, textRect.y + fm.getAscent()); } } } Index: javax/swing/plaf/basic/BasicLookAndFeel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v retrieving revision 1.55 diff -u -r1.55 BasicLookAndFeel.java --- javax/swing/plaf/basic/BasicLookAndFeel.java 18 Sep 2005 18:16:52 -0000 1.55 +++ javax/swing/plaf/basic/BasicLookAndFeel.java 20 Sep 2005 09:47:42 -0000 @@ -397,7 +397,8 @@ "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), - "EditorPane.border", new BasicBorders.MarginBorder(), + "EditorPane.border", + new BorderUIResource(BasicBorders.getMarginBorder()), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), @@ -915,7 +916,8 @@ "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), - "TextArea.border", new BasicBorders.MarginBorder(), + "TextArea.border", + new BorderUIResource(BasicBorders.getMarginBorder()), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("Monospaced", Font.PLAIN, 12), @@ -965,7 +967,8 @@ "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), - "TextPane.border", new BasicBorders.MarginBorder(), + "TextPane.border", + new BorderUIResource(BasicBorders.getMarginBorder()), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), Index: javax/swing/plaf/basic/BasicTextPaneUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextPaneUI.java,v retrieving revision 1.5 diff -u -r1.5 BasicTextPaneUI.java --- javax/swing/plaf/basic/BasicTextPaneUI.java 14 Sep 2005 07:58:07 -0000 1.5 +++ javax/swing/plaf/basic/BasicTextPaneUI.java 20 Sep 2005 09:47:42 -0000 @@ -38,11 +38,18 @@ package javax.swing.plaf.basic; +import java.awt.Color; + import javax.swing.JComponent; +import javax.swing.JTextPane; +import javax.swing.plaf.ColorUIResource; import javax.swing.UIDefaults; import javax.swing.plaf.ComponentUI; import javax.swing.text.Element; import javax.swing.text.PlainView; +import javax.swing.text.Style; +import javax.swing.text.StyleConstants; +import javax.swing.text.StyleContext; import javax.swing.text.View; public class BasicTextPaneUI extends BasicEditorPaneUI @@ -70,5 +77,24 @@ protected String getPropertyPrefix() { return "TextPane"; + } + + /** + * Installs this UI on the specified JTextPane. This calls the + * super implementation and then adds a default style to the text pane. + * + * @param c the text pane to install the UI to + */ + public void installUI(JComponent c) + { + super.installUI(c); + JTextPane tp = (JTextPane) c; + Style defaultStyle = tp.getStyle(StyleContext.DEFAULT_STYLE); + defaultStyle.addAttribute(StyleConstants.Foreground, + new ColorUIResource(Color.BLACK)); + defaultStyle.addAttribute(StyleConstants.FontFamily, "Serif"); + defaultStyle.addAttribute(StyleConstants.Italic, Boolean.FALSE); + defaultStyle.addAttribute(StyleConstants.Bold, Boolean.FALSE); + defaultStyle.addAttribute(StyleConstants.FontSize, new Integer(12)); } }