mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-15 12:55:07 +00:00
6882917: Nimbus and DefaultTableCellRenderer: must start with normal background
Reviewed-by: rupashka
This commit is contained in:
parent
207583b21e
commit
92cb82eecb
@ -638,7 +638,7 @@ class SynthTableUI extends BasicTableUI implements SynthUI,
|
||||
if ((b == null || b instanceof UIResource
|
||||
|| component instanceof SynthBooleanTableCellRenderer)
|
||||
&& !table.isCellSelected(row, column)) {
|
||||
if (alternateColor != null && row % 2 == 0) {
|
||||
if (alternateColor != null && row % 2 != 0) {
|
||||
component.setBackground(alternateColor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,8 +214,9 @@ public class DefaultTableCellRenderer extends JLabel
|
||||
: table.getBackground();
|
||||
if (background == null || background instanceof javax.swing.plaf.UIResource) {
|
||||
Color alternateColor = DefaultLookup.getColor(this, ui, "Table.alternateRowColor");
|
||||
if (alternateColor != null && row % 2 == 0)
|
||||
if (alternateColor != null && row % 2 != 0) {
|
||||
background = alternateColor;
|
||||
}
|
||||
}
|
||||
super.setForeground(unselectedForeground != null
|
||||
? unselectedForeground
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user