Witam chciałbym pokolorować poszczególne komórki JTable..
Próbuje tak:
table.getCellRenderer(0, 0).getTableCellRendererComponent(table, new JLabel(), false, true, 0, 0).setBackground(new java.awt.Color(255,0,0));
table.getCellRenderer(0, 0).getTableCellRendererComponent(table, new JLabel(), false, true, 0, 1).setBackground(new java.awt.Color(0,255,0));
table.getCellRenderer(0, 0).getTableCellRendererComponent(table, new JLabel(), false, true, 0, 2).setBackground(new java.awt.Color(0,0,255));
table.getCellRenderer(0, 0).getTableCellRendererComponent(table, new JLabel(), false, true, 0, 3).setBackground(new java.awt.Color(255,255,0));
Niestety kolorują mi się wszystkie komórki tabelki na ten ostatni kolor (255,255,0).
Co tu zrobić, żeby uzyskać porządany efekt?
bardzo proszę o odpowiedź...