how to set color on text in a List

Discussion in 'Java' started by sam, Apr 6, 2004.

  1. sam

    sam Guest

    hi,

    Does anyone know how to set multi-color on text in a list box (List)??
    I m using JDK 1.1.8

    thanks
    sam
    sam, Apr 6, 2004
    #1
    1. Advertising

  2. On Tue, 06 Apr 2004 23:00:38 +0800, sam wrote:

    > Does anyone know how to set multi-color on text in a list box (List)??


    Best put to..
    <http://www.physci.org/codes/javafaq.jsp#cljg>

    Have a look at ListCellRenderer.

    If you can come up with code to render
    the colors as you like, whack it in a
    ListCellRenderer and apply that to the
    List, then you'll be laughing.

    > I m using JDK 1.1.8


    You poor thing. ;-)

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Apr 6, 2004
    #2
    1. Advertising

  3. sam

    sam Guest

    Andrew Thompson wrote:

    > On Tue, 06 Apr 2004 23:00:38 +0800, sam wrote:
    >
    >
    >>Does anyone know how to set multi-color on text in a list box (List)??

    >
    >
    > Best put to..
    > <http://www.physci.org/codes/javafaq.jsp#cljg>
    >
    > Have a look at ListCellRenderer.
    >
    > If you can come up with code to render
    > the colors as you like, whack it in a
    > ListCellRenderer and apply that to the
    > List, then you'll be laughing.
    >

    Any sample code??
    thanks
    >
    >>I m using JDK 1.1.8

    >
    >
    > You poor thing. ;-)
    >
    sam, Apr 6, 2004
    #3
  4. On Wed, 07 Apr 2004 03:00:38 +0800, sam wrote:
    > Andrew Thompson wrote:
    >> On Tue, 06 Apr 2004 23:00:38 +0800, sam wrote:

    ...
    >>>Does anyone know how to set multi-color on text in a list box (List)??

    ....
    >> Have a look at ListCellRenderer.

    ....
    > Any sample code??


    (shrugs) Not specifically set-up to
    demonstrate the concept, no.

    I did, however, code a FontCellRenderer
    for a text editor, you can find it in
    the PhySci jar file.
    <http://www.physci.org/PhySci.jar>

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Apr 6, 2004
    #4
    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. =?Utf-8?B?QVNQIFlhYm9o?=

    Set Text Color by Column in a Repeater Control

    =?Utf-8?B?QVNQIFlhYm9o?=, Oct 14, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,191
    =?Utf-8?B?QVNQIFlhYm9o?=
    Oct 15, 2004
  2. Matt Adams
    Replies:
    0
    Views:
    874
    Matt Adams
    Aug 26, 2003
  3. M. Craig

    How to set background color of List item in dropdown list

    M. Craig, Nov 12, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    276
    M. Craig
    Nov 12, 2003
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    381
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    7
    Views:
    364
    Mick White
    Feb 2, 2005
Loading...

Share This Page