Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6626715

Nimbus L&F: JCheckBoxes don't honor setBackground()

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0_05-ea"
      Java(TM) SE Runtime Environment (build 1.6.0_05-ea-b04)
      Java HotSpot(TM) Client VM (build 1.6.0_05-ea-b04, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP

      A DESCRIPTION OF THE PROBLEM :
      In Nimbus, if you try to set a different background color using setBackground(), it is ignored.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Add a JCheckBox to a frame and set its background color to anything other than the standard (for example, checkbox.setBackground(new java.awt.Color(255, 255, 153)). Under Nimbus, this new background color will not be used. The background color of the container of the checkbox will be used instead.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Having the checkbox displayed with the background color passed in setBackground().
      ACTUAL -
      The checkbox is displayed with the background color of its container.

      REPRODUCIBILITY :
      This bug can be reproduced always.

            jasper Jasper Potts (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: