So I'm working on making a small chat client. The area where you display different user messages I originally had as a JTextArea. I realized that (to my knowledge), I can't change the color of specific Strings in the component without changing the color of all the text. Such as Usernames, specific words, etc.
A little research shows that JTextPane allows you to modify Strings apart from others. However, it doesn't have the append() method from JTextArea which allows me to add text directly after that last line. I didn't see that JTextPane inherited any type of method such as that.
If someone could give me some pointers on how add messages one after another without an append() method in JTextPane?
Or maybe there's something I'm missing? Completely different text component that I can use?
I'm guessing you haven't read the tutorial. It's not going to be easy learning about a complex tool like JTextPane by asking random questions on a forum. I strongly recommend reading the tutorial and playing around with the examples it provides to see what you can make them do. That's how I learn about Java features which I haven't run into before.