List of usage examples for javax.swing JTable doLayout
public void doLayout()
From source file:Main.java
@SuppressWarnings("serial") public static void setupTable(JTable jTable, TableCellRenderer tableCellRenderer, String[][] content) { jTable.setModel(new DefaultTableModel(content, content[0]) { @Override//from ww w . j av a 2s. c o m public boolean isCellEditable(int i, int j) { return false; } }); for (int j = 0; j < jTable.getColumnModel().getColumnCount(); j++) { jTable.getColumnModel().getColumn(j).setCellRenderer(tableCellRenderer); } jTable.doLayout(); }