Index: javax/swing/plaf/basic/BasicButtonUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicButtonUI.java,v retrieving revision 1.29 diff -u -r1.29 BasicButtonUI.java --- javax/swing/plaf/basic/BasicButtonUI.java 2 Oct 2005 06:04:13 -0000 1.29 +++ javax/swing/plaf/basic/BasicButtonUI.java 7 Oct 2005 11:28:47 -0000 @@ -283,7 +283,7 @@ Icon i = b.getIcon(); ButtonModel model = b.getModel(); - if (model.isPressed() && b.getPressedIcon() != null) + if (model.isPressed() && b.getPressedIcon() != null && b.isEnabled()) i = b.getPressedIcon(); else if (model.isRollover()) @@ -294,7 +294,7 @@ i = b.getRolloverIcon(); } - else if (b.isSelected()) + else if (b.isSelected() && b.isEnabled()) { if (b.isEnabled() && b.getSelectedIcon() != null) i = b.getSelectedIcon(); @@ -349,7 +349,7 @@ paintIcon(g, c, ir); if (text != null) paintText(g, b, tr, text); - if (b.isFocusOwner()) + if (b.isFocusOwner() && b.isFocusPainted()) paintFocus(g, b, vr, tr, ir); } Index: javax/swing/plaf/basic/BasicRadioButtonUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,v retrieving revision 1.12 diff -u -r1.12 BasicRadioButtonUI.java --- javax/swing/plaf/basic/BasicRadioButtonUI.java 30 Sep 2005 13:15:45 -0000 1.12 +++ javax/swing/plaf/basic/BasicRadioButtonUI.java 7 Oct 2005 11:28:47 -0000 @@ -95,6 +95,10 @@ b.setIcon(icon); if (b.getSelectedIcon() == null) b.setSelectedIcon(icon); + if (b.getDisabledIcon() == null) + b.setDisabledIcon(icon); + if (b.getDisabledSelectedIcon() == null) + b.setDisabledSelectedIcon(icon); } /** @@ -141,10 +145,14 @@ g.setFont(f); Icon currentIcon = null; - if (b.isSelected()) + if (b.isSelected() && b.isEnabled()) currentIcon = b.getSelectedIcon(); - else + else if (!b.isSelected() && b.isEnabled()) currentIcon = b.getIcon(); + else if (b.isSelected() && !b.isEnabled()) + currentIcon = b.getDisabledSelectedIcon(); + else // (!b.isSelected() && !b.isEnabled()) + currentIcon = b.getDisabledIcon(); SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities.layoutCompoundLabel @@ -160,7 +168,7 @@ if (text != null) paintText(g, b, tr, text); // TODO: Figure out what is the size parameter? - if (b.hasFocus()) + if (b.hasFocus() && b.isFocusPainted()) paintFocus(g, tr, null); } Index: javax/swing/plaf/basic/BasicToggleButtonUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java,v retrieving revision 1.12 diff -u -r1.12 BasicToggleButtonUI.java --- javax/swing/plaf/basic/BasicToggleButtonUI.java 28 Sep 2005 15:17:42 -0000 1.12 +++ javax/swing/plaf/basic/BasicToggleButtonUI.java 7 Oct 2005 11:28:47 -0000 @@ -106,7 +106,7 @@ paintIcon(g, b, ir); if (text != null) paintText(g, b, tr, text); - if (b.isFocusOwner()) + if (b.isFocusOwner() && b.isFocusPainted()) paintFocus(g, b, vr, tr, ir); }