Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to set color on text in a List

Reply
Thread Tools

how to set color on text in a List

 
 
sam
Guest
Posts: n/a
 
      04-06-2004
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
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      04-06-2004
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
 
Reply With Quote
 
 
 
 
sam
Guest
Posts: n/a
 
      04-06-2004
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.
>

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      04-06-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
Change text color for one document.write but not color of all text? kroger@princeton.edu Javascript 7 02-02-2005 01:23 PM
Set Text Color by Column in a Repeater Control =?Utf-8?B?QVNQIFlhYm9o?= ASP .Net 2 10-15-2004 12:05 PM
How to set background color of List item in dropdown list M. Craig ASP .Net Web Controls 0 11-12-2003 06:26 PM
Change text color of "visited link" back to unvisited color ??? Matt Adams HTML 0 08-26-2003 10:27 AM



Advertisments