• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTextArea - more than one color

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !!
 
reply
    Bookmark Topic Watch Topic
  • New Topic