Component (final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { final Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); setText(StringUtil.notNullize(getItemText(value))); setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2)); setHorizontalTextPosition(SwingConstants.LEFT); setBackground(isSelected ? UIUtil.getListSelectionBackground(true) : UIUtil.getListBackground()); setForeground(isSelected ? NamedColorUtil.getListSelectionForeground(true) : NamedColorUtil.getInactiveTextColor()); return component; }