JDK-6640344 : Nimbus L&F: JTree expand/collapse triangles are wrong color for selected cell
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5,6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp,windows_vista
  • CPU: generic,x86
  • Submitted: 2007-12-11
  • Updated: 2011-03-05
  • Resolved: 2008-01-08
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
6u10 b10Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
FULL PRODUCT VERSION :
JRE6 early access (jre6u10b08)

ADDITIONAL OS VERSION INFORMATION :
Windows XP SP2

A DESCRIPTION OF THE PROBLEM :
According to the Nimbus spec, when a JTree cell is selected, the little triangle used to expand/collapse parents should be drawn in white instead of the normal gray color. Instead, it's always drawn in the same gray color regardless of selection state, which is not easy to see against the blue background of the selection.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Use Nimbus.
2. Create a JTree with anything in it.
3. Select a parent node.
4. Bear witness that the little gray triangle on the left hand side, used to expand/collapse the parent, is not being shown as white.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected a white triangle, per the Nimbus spec for trees.
ACTUAL -
Got the same gray triangle that's used for non-selected tree parents.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
No workaround available as far as I know.

Comments
EVALUATION It turns out to be a bug in SynthTreeUI. SynthTreeUI is passing via the SynthContext the state of the tree, as opposed to the state of the row. So since the tree is Enabled but not Selected, the row is never "Selected" and thus the white triangle icon is never used.
18-12-2007