JDK-6595230 : Nimbus LAF : Background color of the Jlist changed to default color when the focus is gained
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-08-21
  • Updated: 2011-02-24
  • Resolved: 2007-12-07
Related Reports
Duplicate :  
Description
I am changing the background of the color of the jlist, by selecting the color from the color chooser. I can see the jlist background color is changed. But when i click on any item in the list the background color of the list changes to default color(white). 

Step to reproduce:
-------------------
1) Run the attached program.
2) Click on the 'BackGround' button. Select any color of your choice from the color chooser.
 Observe that the selected color is applied to the list background.
3) click inside the list to selected or if focus is on the 'Background' button. press SHIFT + TAB, to move the focus to the list. Observe that applied background color is changed to default color(white) . If you see the same then the bug  is reproduced.

Comments
EVALUATION Background colors are not being handled correctly by Synth. SynthStyle hard codes that only when the state is ENABLED (not ENABLED and MOUSE_OVER, or any other combination, only ENABLED) the background color applied by the developer is honored, otherwise it is ignored and the LAF background is used. This has been fixed in bug 6604357.
07-12-2007