• Post Reply Bookmark Topic Watch Topic
  • New Topic

Have multicolor text in the same textarea(urgent)

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai, I'm very much interested to have atlest two different coloured text in the same textarea.For eg. in chat pages we can see that the message we type is preceeded by our nickname in one color & the nickname of the sender(i.e with whom we chat) appears in a different color in the same textarea.How is it possible?Please help me out to do this as soon as possible.
Thank You
 
Rehan Malik
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TextArea nor JTextArea will work to show multiple colors.
You'll have to use JTextPane in order to accomplish this.
Also refer to the "Style" class and other refrenced classes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!