JDK-6382711 : JComboBox incorrectly rendered with alternate WinXP theme
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-02-08
  • Updated: 2017-05-16
  • Resolved: 2006-06-14
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 b88Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b68)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b68, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
using visual style/theme from http://osx.portraitofakite.com

A DESCRIPTION OF THE PROBLEM :
  Bug ID 5106661 claims to have been fixed in the first release candidate, Jan 2006 of Mustang. True, many components (scroll bars, small JButtons, etc.) are rendered correctly, however JComboBoxes are obviously not:

- The JComboBox height is too tall.
- The JComboBox appears to have too wide of a padding inside (i.e., the button and text are indented too far from the left and right edges of the JComboBox.
- The up and down arrows on the JComboBoxes button have white borders.
- The JComboBox is drawn with the wrong border (on my particular config, it has no border at all)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install the Mac OS X theme for Windows XP from http://osx.portraitofakite.com
Make a small test application that opens the Swing JFileChooser dialog.
Examine how this dialog compares to a native Open dialog, also affected by the theme, such as in Mozilla's Firefox browser

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
If native apps can render JComboBoxes correctly with an XP theme, then so should Mustang.
ACTUAL -
JComboBoxes are too tall, unbordered, and have exta padding, and poor spinner buttons on the pull-down button, compared to native ComboBoxes

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION DELETED
02-10-2006

EVALUATION Since the fix is related this will also address the need for adding rollover states to comboboxes. See 6397105.
26-05-2006

EVALUATION The white ghost borders on the glyph in the dropdown menu are actually caused by a Skin painting bug. I have opened a new ID for it: 6390608
25-02-2006

EVALUATION Research has turned up two things. First, the WindowsComboBoxUI is not painting a skinned background the way that WindowsButtonUI does. This means that themes where the combobox uses an image background instead of a border fill background will draw nothing. Second, the Windows look and feel is adding an XPEmptyBorder to the combobox that is derived from the ComboBox.SizingMargins property. This property should be used for drawing, not sizing (despite it's name). Thus, in themes that have large SizingMargins (like the OSX theme mentioned here) the combobox will be hugely oversized.
25-02-2006