posted 17 years ago
hi
to change the backgroud of the whole table implement this
--> table.setBackground(Color.red);
If you would like that the filled rows sholud have different colors from the one that are empty then you have to write another class implementing TableCellRenderer and then call
TableCellRenderer renderer = new MytableRenderer();
table.setDefaultRenderer(Object.class, renderer);
and in this overload function "getTableCellRendererComponent(..)" where in you can specify color for each row.