I'm trying to change the background color of a JComboBox (not the selection list), and it doesn't seem to be working. For example
JComboBox myCombo = new JComboBox(new String[] { "values" });
myCombo.setBackground(Color.GREEN);
should change the background color of the JComboBox to green... right? But this doesn't seem to occur. What is interesting is that the following code
JComboBox.myCombo = new JComboBox(new String[] { "values" });
myCombo.setForeground(Color.GREEN);
will successfully change the font of the JComboBox to green.
Has anyone else experienced this problem?