This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change background/foreground color of a disablled object

 
D. Formenton
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How I can change background/foreground color of a disablled object (i.e. JCheckBox, JTextField and so on..)?

Thank you, very much!

Domenico
 
bhanu chowdary
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this out. You can change the back-ground colour. Please go through the API.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use UIManager to manipulate the TextField.disabledBackground.

You will also find this a useful read http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/ *
*The author Rob Camick is one of the active contributors here at the Ranch.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic