Change background color editable JComboBox
问题 I am programming an editable combobox in a JFrame Form, but i want to change te background color. How the program works: If i click the button "press", then the combobox his background needs to become black. I tried: 1. cbo.setBackground(Color.BLACK); But it did nothing 2 cbo.getEditor().getEditorComponent().setBackground(Color.BLACK); ((JTextField) cbo.getEditor().getEditorComponent()).setOpaque(true); Does this: Code example: public class NewJFrame extends javax.swing.JFrame { private