Archived

This topic is now archived and is closed to further replies.

ManiacMac

[java] Styles & html

Recommended Posts

Im trying to figure out how to add colors, and bold/italic fonts to a JTextPane, but the API, and tutorials on java.sun.com, dont really help. Ive seen some things about html, so is it possible to use that with them? Else, can anyone offer help when it comes to adding styles to the TextPane?

Share this post


Link to post
Share on other sites
Look at Document objects and their tree representation. Each Element has an AttributeSet - check that out.

Share this post


Link to post
Share on other sites