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); } });
1.4m articles
1.4m replys
5 comments
57.0k users