Component (JList<? extends PluginDescriptor> list, PluginDescriptor value, int index, boolean isSelected, boolean cellHasFocus) { Color backgroundColor = isSelected ? list.getSelectionBackground() : list.getBackground(); myNameLabel.setText(value.name()); myNameLabel.setForeground(isSelected ? list.getSelectionForeground() : list.getForeground()); myPanel.setBackground(backgroundColor); String description = new HtmlBuilder() .append(value.description()) .wrapWith(HtmlChunk.div().attr("WIDTH", "400")) .wrapWith("html") .toString(); myDescLabel.setText(description); myDescLabel.setForeground(LookupCellRenderer.getGrayedForeground(isSelected)); myDescLabel.setBackground(backgroundColor); return myPanel; }