mode.addRow with background color
Hy ,
I have a table , in which i am adding new rows , after 6 rows with data I want to add a empty row with the background color red then another 6 rows with white background and so on
Code :
private void populate(){
DefaultTableModel model = (DefaultTableModel) table.getModel();
int i,j;
for(j=0;j<6;j++){
for(i=0;i<6;i++){
model.addRow(new Object[]{"dada","dadaddd"});
}
model.addRow(new Object[]{"",""}); //<-this is the red row i want to add
}
}
How can i change the color of the empty row?
Re: mode.addRow with background color
Re: mode.addRow with background color
I have read the article but i still dont know how to implement it.
Please help me
Re: mode.addRow with background color
Quote:
Originally Posted by
nsyncpilu
I have read the article but i still dont know how to implement it.
Please help me
What did you try? Did you try to use some of the code examples in the tutorial?