permaculture playing cards*
The moose likes Beginning Java and the fly likes setting color in JTextfield object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "setting color in JTextfield object" Watch "setting color in JTextfield object" New topic
Author

setting color in JTextfield object

capp luckett
Ranch Hand

Joined: Dec 07, 2000
Posts: 33
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


flodin
Michael Bruesch
Ranch Hand

Joined: Sep 23, 2001
Posts: 158
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


Michael J Bruesch<br /><i>I code, therefore I am.</i>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting color in JTextfield object
 
Similar Threads
How to show a single error message for all fields
How to insert enum type entity in MySQL with JPA
ListCellRenderer!!!Help!!
Question about referencing a reused Swing component
how to create tablespace in java dbms