Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting foreground of a disabled text field  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I am trying to set the foreground of a disabled text field to a different color. I tried using :
However, that did not work. I am using a custom class that I have created for all of my text fields that extends JTextField, with an inner class extending PlainDocument. Is this part of my problem? If so, why, and what do I need to do?
I changed the UIManager default for disabled foreground on a custom Combo Box that I created, which extends JComboBox.
What is different about these two components?
Thanks for any help!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, it's something to do with your extended classes... this works on default JTextFields. (At least in JDK 1.4.1)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!