Background color of the selected item in an uneditable JComboBox
The background color of the selected item in an uneditable JComboBox is a sort of blue: Is there any way to make this a different color, such as white, for example? This should work jComboBox1.setRenderer(new DefaultListCellRenderer() { @Override public void paint(Graphics g) { setBackground(Color.WHITE); setForeground(Color.BLACK); super.paint(g); } }); The background assigned by the renderer is overriden by the selection background color of the JList that is used in the popup for the combo box. Check out the "paintCurrentValue" method of the BasicComboBoxUI class. So the workaround would be: