From the Question above, I’ve made a simple windows app similar to MSN and Yahoo Messenger. When a user types a message and hits the “SEND” button, The code below appends the user’s name and message to the the textArea:
textArea_ChatLog.append(chatName + "\n" + " " + msgChat + "\n");
Which would display in this format:
Username
Message the user typed.
Is there solution to changing the color of “chatName?” The only information I’ve found pertains to changing the color of entire components (which is what I don’t want).
You may use HTML tags and style with swing components. Take a look at this tutorial – How to Use HTML in Swing Components.