Index: javax/swing/plaf/basic/BasicTextUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.35 diff -u -r1.35 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java 8 Sep 2005 12:02:46 -0000 1.35 +++ javax/swing/plaf/basic/BasicTextUI.java 8 Sep 2005 12:42:43 -0000 @@ -347,7 +347,8 @@ // Document changed. modelChanged(); } - else if (event.getPropertyName().equals("enabled")) + else if (event.getPropertyName().equals("enabled") + || event.getPropertyName().equals("editable")) { updateComponentColors(); } @@ -1084,15 +1085,14 @@ */ void updateComponentColors() { + if (textComponent.isEditable()) + textComponent.setBackground(background); + else + textComponent.setBackground(inactiveBackground); + if (textComponent.isEnabled()) - { - textComponent.setForeground(foreground); - textComponent.setBackground(background); - } + textComponent.setForeground(foreground); else - { - textComponent.setForeground(inactiveForeground); - textComponent.setBackground(inactiveBackground); - } + textComponent.setForeground(inactiveForeground); } } Index: javax/swing/plaf/metal/MetalLookAndFeel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v retrieving revision 1.49 diff -u -r1.49 MetalLookAndFeel.java --- javax/swing/plaf/metal/MetalLookAndFeel.java 8 Sep 2005 12:02:46 -0000 1.49 +++ javax/swing/plaf/metal/MetalLookAndFeel.java 8 Sep 2005 12:42:43 -0000 @@ -866,10 +866,8 @@ "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "TextField.border", MetalBorders.getTextFieldBorder(), - // These color values match the JDK1.5. However, this differs from - // previous JDKs. - "TextField.inactiveBackground", new ColorUIResource(238, 238, 238), - "TextField.inactiveForeground", new ColorUIResource(184, 207, 229), + "TextField.inactiveBackground", getControl(), + "TextField.inactiveForeground", getControlShadow(), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(),