setIcon(new ImageIcon(img));
if(img != null) { setIcon(new ImageIcon(img)); } else { setIcon(null); }
    public Component getListCellRendererComponent(JList list, Object value,            int index,  boolean isSelected, boolean cellHasFocus) {        super.getListCellRendererComponent(                list, value, index, isSelected, cellHasFocus);        Image img = (Image)value;        setIcon(new ImageIcon(img));        setText(null);        return this;    }