Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
Calling setBackground() on a JCheckBox sets the background of the checkbox-box, but not the background of the component itself. This causes problems when a JCheckbox is used as a table cell renderer - particularly, even overriding its painting logic to fill in the background color fails when it is selected. 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)
|