title: JComboBox with text and ImageIcon
body: <p>Good morning, please,could you mind helping me in determining why this ListCellRenderer class not setting the image icon at combobox cells:
  here's the ListCellRenderer class:</p>
  
  <pre><code>    class MyComboRendere implements ListCellRenderer {
  
      public Component getListCellRendererComponent(JList list, Object value,
              int index, boolean isSelected, boolean cellHasFocus) {
  
          JLabel label = new JLabel();
          label.setOpaque(true);
          label.setText(value.toString());
          label.setIcon(new ImageIcon("/pics/Color-icon.png"));
          if (isSelected)
              if (index == 0)
                  label.setBackground(Color.RED);
              else if (index == 1)
                  label.setBackground(Color.GREEN);
              else
                  label.setBackground(Color.BLUE);
          return label;
      }
  
  }
  </code></pre>
  
  <p>and this is a method to setup the combobox:</p>
  
  <pre><code>public void setComboColor(){
      Vector&lt;String&gt; colors=new Vector&lt;&gt;();
      comboPanel=new JPanel(new BorderLayout());
      colors.add("RED");
      colors.add("GREEN");
      colors.add("BLUE");
      colorCombo=new JComboBox(colors);
      colorCombo.setRenderer(new MyComboRendere());
      comboPanel.add(colorCombo,BorderLayout.BEFORE_FIRST_LINE);
  }
  </code></pre>