wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Text Area..please help urgent 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 » Swing / AWT / SWT
Bookmark "Text Area..please help urgent" Watch "Text Area..please help urgent" New topic
Author

Text Area..please help urgent

Elizabeth Luckose
Ranch Hand

Joined: Aug 17, 2001
Posts: 32
Hi
I am working on a chat program. I am appending the messages to a TextArea in an applet. I want to show the messages in different colors as they are appended to the text area. If I call setForeground for the textarea, the messages already appended to the textarea are changed to the new color. How can I prevent this and show only the message that is appended after calling setForeground()be shown in that color? Is there any other way?
Please help...urgent
Thanks,
Elizabeth
Helmut Lerch
Ranch Hand

Joined: Feb 11, 2001
Posts: 48
Originally posted by Elizabeth Luckose:
Hi
I am working on a chat program. I am appending the messages to a TextArea in an applet. I want to show the messages in different colors as they are appended to the text area. If I call setForeground for the textarea, the messages already appended to the textarea are changed to the new color. How can I prevent this and show only the message that is appended after calling setForeground()be shown in that color? Is there any other way?
Please help...urgent
Thanks,
Elizabeth

Since you mention TextArea I assume you are using AWT. You can't color parts of the Text differently within TextArea. You have to use swing or write your own component.
Heli
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Text Area..please help urgent
 
Similar Threads
Urgent
URGENT!!
Help me....Urgent...JTextArea Problem ... Urgent
Need a help on developing multicolored textarea for chat application
changing background color of JFileChooser.-urgent