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?
Advertisement
Answer
This should work
jComboBox1.setRenderer(new DefaultListCellRenderer() { @Override public void paint(Graphics g) { setBackground(Color.WHITE); setForeground(Color.BLACK); super.paint(g); } });