开发者

Setting fonts in a JTextArea

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 JText开发者_StackOverflowArea object.

Thanks.


This is not possible in JTextArea. But you can use JTextPane or JEditorPane.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜