CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    TextArea Coloring

    Hi,
    I'm using JDK1.2.2.I've a TextArea with 10 lines.Each line should be displayed
    in one,one color.How can I do this?.Any idea/suggestion will be greatly helpful for me.
    Thanks in advance.


  2. #2
    Guest

    Re: TextArea Coloring

    hai,
    If you want to display each line in a TextArea in a different color, it is not possible to do that directly. Your setForeground(Color) method of TextArea will change the color of the entire text displayed in the TextArea. What I would suggest U is to override the paint(Graphics ) method of TextArea. In the overriding method U will have to use setColor(Color ) of Graphics. This will help U achieve that. U may also go through the source code of TextArea provided by Sun. This will give you a clearer picture in such circumstances
    thanx,
    devi prasad m. p.
    [email protected]


  3. #3
    Join Date
    May 2000
    Location
    AP,INDIA
    Posts
    13

    Re: TextArea Coloring

    can you be more eloberate please

    send to my mail id
    [email protected]

    thanks in advance



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured