-
Bug
-
Resolution: Fixed
-
P4
-
6u14
-
b77
-
x86
-
windows_vista
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2186928 | OpenJDK6 | Peter Zhelezniakov | P3 | Resolved | Fixed | b18 |
FULL PRODUCT VERSION :
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
in all uis/components/OS supporting I have seen so for, the first row has normal background color and the second has the alternate color. With zero-based index counting that is alternate color in every odd row. Nimbus/DefaultTableCellRenderer do it the wrong way round: start with alternate in first row and use normal for second. Reason is that it calculates the "second" row as being the even ... which is ... ehem ... wrong in zero based counting. For consolation - we at SwingX had it incorrect in early versions as well <g>
Fix is easy: in DefaultTableCellRenderer and SynthTableCellRenderer replace
if row % 2 == 0
with
if row % 2 != 0
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
setting priority to high as it hits us in SwingX particularly: we do have problems with Nimbus colors and SwingX renderers (not quite understood yet) which get much worse with this incorrect color alternation
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
in all uis/components/OS supporting I have seen so for, the first row has normal background color and the second has the alternate color. With zero-based index counting that is alternate color in every odd row. Nimbus/DefaultTableCellRenderer do it the wrong way round: start with alternate in first row and use normal for second. Reason is that it calculates the "second" row as being the even ... which is ... ehem ... wrong in zero based counting. For consolation - we at SwingX had it incorrect in early versions as well <g>
Fix is easy: in DefaultTableCellRenderer and SynthTableCellRenderer replace
if row % 2 == 0
with
if row % 2 != 0
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
setting priority to high as it hits us in SwingX particularly: we do have problems with Nimbus colors and SwingX renderers (not quite understood yet) which get much worse with this incorrect color alternation
- backported by
-
JDK-2186928 Nimbus and DefaultTableCellRenderer: must start with normal background
- Resolved