Questions about fonts

Well my question is simple, is it possible to get different style of text in a single JTextArea, something like this:

hellofriend, this is blue, this red, this is a 14pt font.

Well people I think you get the idea.

So how can i do it?

is there a way without declaring so many objects or something like that to get it?

Thanks a lot

[382 byte] By [AlbertoPintoa] at [2007-11-27 6:53:19]
# 1
You can use other text components to do that: http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
Hippolytea at 2007-7-12 18:28:02 > top of Java-index,Java Essentials,New To Java...
# 2
Use a JTextPane
kajbja at 2007-7-12 18:28:02 > top of Java-index,Java Essentials,New To Java...
# 3
> You can use other text components to do that:> http://java.sun.com/docs/books/tutorial/uiswing/compon> ents/editorpane.htmlCongrats on the 1000th post
kajbja at 2007-7-12 18:28:02 > top of Java-index,Java Essentials,New To Java...
# 4

> > You can use other text components to do that:

> >

> http://java.sun.com/docs/books/tutorial/uiswing/compon

>

> > ents/editorpane.html

>

> Congrats on the 1000th post

A sad day for me. When I get a hundred dukes, I will reincarnate.

Hippolytea at 2007-7-12 18:28:02 > top of Java-index,Java Essentials,New To Java...