I have an (abstract table model) table and would like to center the column headings.
I've tried the following:
DefaultTableCellRenderer centralizado = new DefaultTableCellRenderer();
centralizado.setHorizontalAlignment(SwingConstants.CENTER);
tabela.getColumnModel().getColumn(0).setCellRenderer(centralizado);
What's wrong? Can not do just this way?