1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
public class editeurCell extends DefaultTableCellRenderer
{
private static final long serialVersionUID = 1L;
public Component getTableCellRendererComponent
(JTable table, Object value, boolean selected, boolean focused, int row, int column)
{
setEnabled(table == null || table.isEnabled()); // on crée une fonte
Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
c.setForeground(Color.BLUE);
c.setBackground(Color.YELLOW);
Font fonte = new Font("Book Antiqua", Font.BOLD ,20);
c.setFont(fonte) ;
return c;
}
} |
Partager