JDK-5043232 : GTK L&F: Cannot set background color on JSlider
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2004-05-06
  • Updated: 2004-05-10
  • Resolved: 2004-05-10
Related Reports
Duplicate :  
Description
Calling setBackground() on a JSlider appears to have no effect whatsoever on GTK look and feel.  While NetBeans is not directly affected by this, other apps may be, so probably this should be fixed along with the rest of the background color issues.

See attached demo app (a NetBeans project - unzip and run "ant run" to build and run it) - it will show a frame, then on a timer, set the colors of all components in the frame, then do so again, also setting the selected state of all AbstractButtons in the frame.

(This issue originally intended to be part of bug 4997237 which has been closed)

Comments
WORK AROUND Write a custom cell renderer for the combo box which detects if it is running on GTK L&F and invokes its own painting logic in that case.
11-06-2004

EVALUATION Closing as duplicate of 5043225. ###@###.### 2004-05-10
10-05-2004