Java set Font Color in a disabled Text Field
I have a disabled JTextField and due to read开发者_如何转开发ability problems i want to make the font black again. So that it looks like its not disabled, but i cant edit it. any suggestions?
You can use the setDisabledTextColor(Color c)
method to set the desired color. For more information check: javadocs
Try using the method setDisabledTextColor (inherited from JTextComponent)
Please use setDisabledTextColor(Color.BLACK)
to make your text color black.
精彩评论