Hi,
We use comboboxes with valuelists.
In WindowsXp the normal background is White and the disabled background is Grey.
So we used the following code to correct this
application.setUIProperty("ComboBox.disabledBackground", new Packages.javax.swing.plaf.ColorUIResource(java.awt.Color.WHITE));
application.setUIProperty("ComboBox.disabledForeground", new Packages.javax.swing.plaf.ColorUIResource(java.awt.Color.BLACK));
In Windows 7 the normal background color is grey and also the disabled background is grey.
The code
application.setUIProperty("ComboBox.disabledBackground", new Packages.javax.swing.plaf.ColorUIResource(java.awt.Color.WHITE));
application.setUIProperty("ComboBox.disabledForeground", new Packages.javax.swing.plaf.ColorUIResource(java.awt.Color.BLACK));
does not work.
I also tried
application.setUIProperty("ComboBox.background", new Packages.javax.swing.plaf.ColorUIResource(java.awt.Color.WHITE));
application.setUIProperty("ComboBox.foreground", new Packages.javax.swing.plaf.ColorUIResource(java.awt.Color.BLACK));
but that does also not work.
Any ideas to set the background color of a combobox ??
Regards,
Hans