I've encountered a problem in coding my JComboBox. I am trying to change the color of some of the combo box's items. The combo box if connected to a file and by choosing one of its items, it fetches a row in that file. I want the color of the item be different if the row contains zero. 
The problem is I cannot get if done with ComboBoxRenderer nor CellRenderer. 
Here is my code:
JComboBox combo = new JComboBox(industryName);
   combo.setSelectedItem(null);
    combo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e){
            String selectedString = (String) combo.getSelectedItem();
            try {  
                CSVReader reader = new CSVReader(new FileReader(myFile));
                String[] nextLine;
                while ((nextLine = reader.readNext()) != null) {
                    if(nextLine[1].equals(industry) ){
                        x= nextLine; 
                        x2 = Arrays.toString(nextLine);
                        break;
                    }
                }
                reader.close();
            } catch (FileNotFoundException e1) {
                System.out.println("File not fount");
                e1.printStackTrace();
            } catch (IOException e3) {
                e3.printStackTrace();
            }
            catch (NullPointerException e2){
                JOptionPane.showMessageDialog(frame.getComponent(0), "Please choose ...");
            }
        }
    });
    ComboBoxRenderer renderer = new ComboBoxRenderer(comboBoxIndustry, x2);
    comboBoxIndustry.setRenderer(renderer);
class ComboBoxRenderer extends JPanel implements ListCellRenderer{
private static final long serialVersionUID = -1L;
private String[] x2;
private String[] strings;
JLabel text;
public ComboBoxRenderer(JComboBox combo, String[] x2) {
    this.x2 = x2;
    text = new JLabel();
    text.setOpaque(true);
    text.setFont(combo.getFont());
}
@Override
public Component getListCellRendererComponent(JList list, Object value,
        int index, boolean isSelected, boolean cellHasFocus) {
    if (isSelected)
    {
        setBackground(list.getSelectionBackground());
    }
    else
    {
        setBackground(Color.WHITE);
    }
    text.setBackground(getBackground());
    text.setText(value.toString());
    for(int i = 0; i <x2.length; i++){
         String[] disable = x2[0].split(",");
         if(Double.parseDouble((String) disable[2]) == 0.000000){
             //combo.getEditor().getEditorComponent().setBackground(Color.YELLOW);
             text.setForeground(Color.YELLOW);
       // ((JTextField) comboBoxIndustry.getEditor().getEditorComponent()).setBackground(Color.YELLOW);
    }
    }
    return text;
}
}