Article View: borland.public.jbuilder.java.swing
Article #7969Re: Custom cell renderer for JList
From: John McGrath TeamB
Date: Fri, 17 Nov 2000 00:00
Date: Fri, 17 Nov 2000 00:00
24 lines
1274 bytes
1274 bytes
On Wed, 15 Nov 2000 10:03:55 -0800, Sam wrote:
> I am trying to create a list (using defaultListModel) that
> consists of items of either bold or normal text depending on
> whether the item was accessed.
>
> I have created a custom cell renderer class according to
> examples I've found in various places, but whenever I change
> a font/color of one item of the list the entire list changes.
>
> Can someone give me some hints on how to do this or other
> places to look for examples?
I think you can do this without writing a custom renderer, by
overriding the prepareRenderer() method for the JTable.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.147ebc375cb93e15989d29@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3A12D00B.A1FC637C@home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,87dde9ec7baa975e X-Google-Attributes: gid111d45,public From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Subject: Re: Custom cell renderer for JList Date: 2000/11/17 Message-ID: <MPG.147ebc375cb93e15989d29@forums.borland.com> X-Deja-AN: 694699668 References: <3A12D00B.A1FC637C@home.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing