list.setCellRenderer(new DefaultListCellRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
boolean cellHasFocus) {
PluginStartupStatus status = (PluginStartupStatus) value;
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (status.getSeverity() == Severity.ERROR)
label.setIcon(UIManager.getIcon("OptionPane.errorIcon"));
if (status.getSeverity() == Severity.WARNING)
label.setIcon(UIManager.getIcon("OptionPane.warningIcon"));
label.setText(status.getMessage());
label.setOpaque(false);
return label;
}
});