At 03:48 PM 2/6/2001 -0500, Madhavi Joshi wrote:

>Hi there,
>   I am trying to create JTable which when passed color and row-index changes
>the color of the specified row( specified by rowIndex)
>  It is very easy for evry column to setRenderer but can we set for every
>row?I tried to do that but it is not working properly.Can you pls help me in
>this!
>  I saw on the net lot of your suggestions given to lot of people!I really
>appreciate it.
>Can you send me any example of changing row colors or else tell me any
>website which has lot of examples of Jtable and other swing components.

Subclass JTable, if you haven't already.  In the subclass, override
getCellRenderer(int,int) to return a new TableCellRenderer that does
what you want.

Now, you can set the color on the renderer as you've done before,
and the table should change appearance everywhere.  (You might
have to call repaint() on the table.)


_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to