This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes changing the color of one char 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 "changing the color of one char" Watch "changing the color of one char" New topic
Author

changing the color of one char

Ran Togo
Greenhorn

Joined: Mar 13, 2006
Posts: 3
is there a way to change the color of only one char in TextArea?
for example, the first char in a string is blue while the rest of the string is in black.
I don't want to use JEditor nor Jlable. I want to change the char in the TextArea.
[ May 19, 2006: Message edited by: Ran Togo ]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

No. If you want to render parts of your text differently from other parts, you have to use a JTextPane or a JEditorPane.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing the color of one char
 
Similar Threads
How do I change font color in text area
Changing text color in TextArea
help in Textarea as i thought
html form controls
set color of just one specific word into the text area.