4
I have a table (Abstract table model) and would like to center column titles.
I tried the following:
DefaultTableCellRenderer centralizado = new DefaultTableCellRenderer();
centralizado.setHorizontalAlignment(SwingConstants.CENTER);
tabela.getColumnModel().getColumn(0).setCellRenderer(centralizado);
What is wrong? It is not possible to do just this way?
@Gustavosantos this solution solved the problem?
– user28595
solved perfectly !
– Gustavo Santos