File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting color in JTextfield object

 
capp luckett
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi (again):
I am trying to set the value place in the field defined below]
to yellow. Would this be the correct syntax? ( I am concerned
that a literal would be put in the field.)
thanks
capp

 
Michael Bruesch
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not a swing expert (yet), but I do believe that that would put the String literal "font color=yellow" inside your JTextField and it would be black still. Maybe try the method Wageout.setForeground (Color.yellow);
I forgot what your textfield is called exactly, but you see what I mean. That should? set the text color. If I'm wrong, please someone correct me.
------------------
Michael J Bruesch
Codito, ergo sum...
I code, therefore I am.
My Java Games, I'm quite proud
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic