Hi i was trying to set different Colors for different rows in a table, but in vain, it was easy to do this for column. any information or piece of code that would help! Thanx ----- Imed
posted 14 years ago
You need to create your own DefaultTableCellRenderer. In the public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) method check the row and set the background color.