Re: Table cell renderer problem - paint problem?
- From: usenet@xxxxxxx (Christian Kaufhold)
- Date: Sun, 24 Apr 2005 18:57:31 +0000 (UTC)
farseer <farseer@xxxxxxxxxxxxx> wrote:
> Further, when ever a cell is clicked, i disabled SelectionAllowed on
> the table and instead, i "outline" the ENTIRE row with a white border
> to show that that row has been selected. this is accomplished by
> overriding JTable's prepareRenderer method.
>
> MY PROBLEM IS, whenever i click on a cell of the table, the entire row
> is highlisted with the white outline border as it should, HOWEVER, then
> i now click on a next row, the Column based on my IconLabel does NOT
> reset. what i mean by that is that the border of the row i had clicked
> before is still highlighted with a white border. why is this?
That's obvious. You have to adjust the border each time, i.e. always
call setBorder
> if ( isRowSelected( row ) )
> c.setBorder( getRowSelectionBorder( c, column) );
else
c.setBorder(?);
(This shows why this external change of border is not a good idea).
Christian
.
- Follow-Ups:
- Re: Table cell renderer problem - paint problem?
- From: farseer
- Re: Table cell renderer problem - paint problem?
- References:
- Table cell renderer problem - paint problem?
- From: farseer
- Table cell renderer problem - paint problem?
- Prev by Date: Re: left justify icon in JTable cell
- Next by Date: Re: Application Storybook Builder - any recommendation?
- Previous by thread: Table cell renderer problem - paint problem?
- Next by thread: Re: Table cell renderer problem - paint problem?
- Index(es):
Relevant Pages
|