dcsimg
How to color a particular row in JTable
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   prashanth_narayan
Posted On:   Tuesday, May 14, 2002 11:10 PM

How to color a particular row in JTable, well I want to color one whole row, how will i do tht
thx in advance
prashant

Re: How to color a particular row in JTable

Posted By:   Manikandan_Adaikkalavan  
Posted On:   Friday, May 17, 2002 06:06 PM




Hi,


are you using cellrenderer in ur program ???

if u r means..... in that cellrenderer class inside the
getTableCellRendererComponent() method , do a check ...
check being that for which row u wants to change color ....

give a if condition like this.....

if(row == rowColortobeChanged)
{
componentObject.setBackground(urCOlor);
}



hope this will help you.....


-Manikandan
About | Sitemap | Contact