Setting fonts in a JTextArea

Posted by vuj on Stack Overflow See other posts from Stack Overflow or by vuj
Published on 2010-03-21T19:21:00Z Indexed on 2010/03/21 19:31 UTC
Read the original article Hit count: 389

Filed under:
|
|

I've got a JTextArea which has the following text "Text1 Text2 Text3". Is there a way I can make all of them different fonts? E.g. "Text1" is bold, "Text2" is italic and "Text3" is normal?

I know I can create a Font object, however I can only apply it the JTextArea object.

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about swing