Differently Coloured Text in one textual area

Discussion in 'Java' started by arun.hallan@gmail.com, Feb 11, 2005.

  1. Guest

    Hi,

    I know this may have been answered before, but i am confused as to if
    these answers only concern entering new colored text into a textual
    area.

    What i want to do is take a stream (or whatever is needed) from an xml
    file, colour the text differently according to whether it is a tag or a
    value or whatever, then output it in some textual area.

    Can someone tell me the best way to go about this?

    Thanks
    , Feb 11, 2005
    #1
    1. Advertising

  2. Andrew Thompson, Feb 11, 2005
    #2
    1. Advertising

  3. Guest

    Hi-

    You have to use JTextPane,Document and AttributeSets to use multi
    color .
    , Feb 11, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sudip

    coloured text...

    sudip, Jul 1, 2005, in forum: C Programming
    Replies:
    4
    Views:
    398
    Dik T. Winter
    Jul 7, 2005
  2. Ghai

    coloured text in console

    Ghai, Apr 19, 2006, in forum: C++
    Replies:
    4
    Views:
    413
    Alf P. Steinbach
    Apr 19, 2006
  3. Tomás Ó hÉilidhe

    Cross-platform: Coloured text, Networking, Multithreading

    Tomás Ó hÉilidhe, Nov 12, 2008, in forum: C Programming
    Replies:
    34
    Views:
    947
    CBFalconer
    Nov 14, 2008
  4. Jonathan Hartley

    cross-platform coloured text in terminal

    Jonathan Hartley, Apr 16, 2010, in forum: Python
    Replies:
    4
    Views:
    366
    Jonathan Hartley
    Apr 20, 2010
  5. Andy B.
    Replies:
    0
    Views:
    801
    Andy B.
    Apr 30, 2010
Loading...

Share This Page