Win a copy of The Java Performance Companion this week in the Performance 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: 11070
13
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