Hi folks!
I just wondered if I can have different colors for the text within the
same TextArea. Drawing a string offers the opportunity to use differen
colors for the font one draws. I just tried to display some lines of
green and some lines of red text within a TextArea and this seems to be
a complete different thing. So I'd like to ask the ones that know if
that is possible in general. It does not seem so. Am I right or do I
just not know how to cope with TextAreas?
Christian
andrewthommo@gmail.com - 23 Jun 2006 13:17 GMT
..
> I just wondered if I can have different colors for the text within the
> same TextArea.
No. Why are you using AWT components?
> ..So I'd like to ask the ones that know if
> that is possible in general.
Sure. In a JEditorPane or JTextPane.
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JEditorPane.html
Andrew T.