I had a list of check-boxes and I want to set different colors on each check-box. Following code does not change the background color
checkBox[i] = new JCheckBox();
checkBox[i].setEnabled(false);
checkBox[i].setBackground(Color.GREEN);
Kindly let me know way of setting background color
for example