Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

multi-color in JTextArea?  RSS feed

 
Marcus Hoe
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently I'm using a JTextArea for a chat program.
1. My idea it to set different color in the text. Eg. Red color for the user's name and black for his/her msg. Or green when some1 enters the chat server. (ie something like what we see in irc).
2. Also, I want the scrollpane to be always scrolled to view the latest msg.
Any means I can achieve them?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!