Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextArea - more than one color

 
Shiva Kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to display each line in a JTextArea in different color, whether is it possible or not, pls help me out
Thanx
Shiva.
 
Sudha Lakshman
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi shiva kumar,
have the same question. but the color set on to the text area once will be applicable for the entire text in the text area.
i wanted to implement the text area as it appears in the Yahoo chat! where each user's messages typed are in different colour. (i.e., one colour for each user)
thank you
regards
sudha
 
Shiva Kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sudha,
Hey ! For that kind of application i am posted this question. If u got any answer pls let me know.
Shiva.
 
Mr IT
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I posted a similar question that was repelied to by Jane Griscti. I also did quite a bit of research on this topic. For awt you will have to use the Canvas component and if you are using swing you can use the JTextPane. TextArea,JTextArea doesn't support mulitcolor lines. I found this old post at http://www.javaranch.com/ubb/Forum2/HTML/000513.html, I hope this helps......GOOD LUCK !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic