Ideally my program should work like this...
Upon button click a random message (out of 3 messages) is appended to a text area(or pane, etc).
One message should display blue, one green and one red.
Currently I am using JTextPane. I have figured out how to append text easily but I cannot get it to show up in the designated color. When using html tags, it doesn't append at all. When I change the foreground color of the text, all of the text changes to one color.
Which would best method to use for what I am trying to do, and how? I've googled everything I can think of and can't find a good example.