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!

UIManager and background color for disabled TextField

843806Dec 9 2008 — edited Dec 10 2008
Hi,

when I want to change global background color for JTextField I use this example code:
UIManager.getLookAndFeel().
getDefaults().put("TextField.background", Color.BLUE);
It works.


How can I change background color for disabled JTextField (setEditable(false))?
Following code doesn't work :(
UIManager.getLookAndFeel().getDefaults().
put("TextField.inactiveBackground", Color.BLUE);
Which property I must change for this in UIManager?

--
regards,
zajjar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2009
Added on Dec 9 2008
8 comments
4,102 views