diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java index 37134ec995..4e1ce9c617 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java @@ -377,15 +377,15 @@ public abstract class JListControlPane extends JControlPane implements ListContr this.textLabel.setText(nameable.getName()); boolean iconSet = false; for (NameableCreator creator : JListControlPane.this.creators()) { + if(isSelected) { + this.textLabel.setBackground(selectedBgColor); + this.textLabel.setForeground(Color.WHITE); + } else { + this.textLabel.setBackground(Color.WHITE); + this.textLabel.setForeground(Color.BLACK); + } if (creator.menuIcon() != null && creator.acceptObject2Populate(nameable) != null) { this.iconLabel.setIcon(creator.menuIcon()); - if(isSelected) { - this.textLabel.setBackground(selectedBgColor); - this.textLabel.setForeground(Color.WHITE); - } else { - this.textLabel.setBackground(Color.WHITE); - this.textLabel.setForeground(Color.BLACK); - } this.setToolTipText(creator.createTooltip()); iconSet = true; break;