JDK-4997237 : GTK L&F: Many components do not honor setBackground()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2004-02-19
  • Updated: 2004-04-13
  • Resolved: 2004-04-13
Related Reports
Duplicate :  
Description
There seem to be a number of problems on GTK look and feel with using components as tree or table cell renderers.  NetBeans makes fairly heavy use of this paradigm, including allowing third parties to plug in custom renderers on our property sheet.

Specific culprits which cause obvious appearance glitches in NetBeans 3.6 beta and JDK 1.5.0 b38 are JCheckbox, JComboBox (and its list cell renderers), JLabel based renderers - the problem seems to be endemic to GTKLookAndFeel.

Comments
EVALUATION Name: omR10226 Date: 03/22/2004 Indeed, components should use background color if it was explicity set. ====================================================================== Name: omR10226 Date: 04/13/2004 Custom renderers are using colors from defaults table. Table was filed by wrong values. We have a bug 5027331 filed against it. Opaque widgets honour a background color in GTK L&F. ======================================================================
11-06-2004

SUGGESTED FIX Enable components to honor background/foreground colors if they have been explicitly set.
11-06-2004