import javax.swing.JList;
import java.awt.Component;
public class ObjectListCellRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
DBObject object = (DBObject) value;
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus );
label.setIcon(object.getIcon(0));
label.setText(object.getQualifiedName());
return label;
}