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
posted 15 years ago
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.