I have searched for an answer for days and read a lot about LookAndFeels and the opaque-issue, but couldn't find a solution. I am developing a Java Application with Swing, using NimbusLookAndFeel. I am satisfied with the look overall, but still want to modify a view things. Now i am stuck, because somehow i can't set the background-color of a disabled JCombobox (combobox.setEnabled(false);)
I already tried like a bazillion of different Properties with UIManager.put(..) + a lot of other things.
If i use another L&F something like this works:
combobox.setRenderer(new DefaultListCellRenderer() {
@Override
public void paint(Graphics g) {
setBackground(Color.WHITE);
setForeground(Color.BLACK);
super.paint(g);
}
});
Any suggestions how to do this with Nimbus?