Either instantiate the JTextArea using the constructor that accepts a
Document
as a parameter or use the
setDocument
method to provide a document model (such as HTML) that will allow you to do fancy formatting.
Here is a link[
^] to the documentation for
Document
. It should provide a starting point for you.