Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Disable JComboBox background

843804Jul 18 2002 — edited Jun 16 2005
Hi guy,

I want to set the background color of a JComboBox.
For a disabled JComBox, I found that the only way is to use


UIManager.getDefaults().put("ComboBox.disabledBackground",
java.awt.Color.red );

However, it will affect all the disabled ComboBox. I want to control the disable color based on some runtime values of the combox

Any workaround
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 14 2005
Added on Jul 18 2002
6 comments
929 views