How do you change the color scheme of a basic ComboBox UI? I what I’ve tried is: setForeGround, setBackground, setOpaque(true), setOpaque(false) setBorder. But none of these work.
My code right now is:
weaponCB.setBounds(27,250,150,30);
weaponCB.setUI(new BasicComboBoxUI());
weaponCB.setForeground(Color.white);
weaponCB.setBackground(Color.black);
weaponCB.setBorder(whiteBorder);
weaponCB.setFont(new Font("Trajan Pro", Font.BOLD, 15));
lP.add(weaponCB, new Integer(2));
This is what appears:

But what I really want is for the drop down section (white region) to look like the display, (black region with "LANCE" in white) i.e have the background be black, the border be white, and, the words be white. If this is possible and you tell me how, it would be a big help to me. Thanks.
Very strange, but when I put weaponCB.setUI(new BasicComboBoxUI()); under the setBackground and setForeground and setBorder, the combobox works as expected. Only the border doesn’t show up.
Another thing that worked was: