1 posts in topic
Flat View  Flat View

Posted By:   vangipuramgovindarajan_padmanaban
Posted On:   Friday, June 7, 2002 12:01 PM


I am developing a Chat server and i need a textarea which supports multiple colors and im not interested in going for swing components.

So does ne1 have any code on this or ne idea of doing it.

thanX a lot in adv,

Re: Awt.TextArea

Posted By:   Badis_BenHamida  
Posted On:   Friday, June 7, 2002 01:27 PM

you should create your own component (subclass java.awt.Component)... that's a lot of work but it is doable. The other alternative that may work is to subclass TextArea and alter the way the text is painted. I haven't tried the latter personally but it is worth the try. You can precede the text with the color value and a code like ##RRGGBB when you set the text (through setText()) and then use that value to set the color during the rendering part.

good luck!
About | Sitemap | Contact