JDK-6390630 : WinLAF: JButtons on XP have text with wrong color / missing shadow using certain 3rd party themes
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-02-25
  • Updated: 2010-05-08
  • Resolved: 2006-05-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b84Fixed
Related Reports
Relates :  
Description
The text on JButtons when running the Windows XP Look and Feel are not drawn correctly with certain themes.  These include themes which use a non-default color for the text, change the color of the text when the button is pressed, or which have drop shadowed text.  The button text drawing code is not respecting any of the colors from the theme and are dropping back to the standard system colors.

Additionally, buttons on the standard XP theme draw the buttons shifted a pixel down and to the right when the user clicks on them. This is classic behavior but not with the XP Standard theme. XP uses rollovers and color change to indicate when a button has been pressed rather than shifting the text.

The attached images show the difference between a Swing button and a native one.

Comments
EVALUATION The fix for this bug introduced regression: 6463915 [REGRESSION: JRadioButton and JCheckBox have wrong disabled foreground under WinXP Look&Feel]
19-12-2006

EVALUATION The text isn't drawn correctly because the codepaths in WindowsButtonUI and WindowsGraphicsUtils don't take any of the XP text properties into account. The theme describes the text color along with the shadow type, shadow offset, and shadow color for all states. The code in WindowsGraphicsUtils needs to be modified to take these values into account.
25-02-2006