column.setHeaderValue(headers.get(i));
tableColumns.add(column);
}
columnModel = new DefaultTableColumnModel();
// create the sortable model by wrapping our simple custom model
sortedModel = new ShuttleSortableTableModel(new CustomerTableModel());
table = new JTable(sortedModel, columnModel);
table.setAutoCreateColumnsFromModel(false);
TableSortIndicator sortIndicator = new TableSortIndicator(table);
new SortTableCommand(table, sortIndicator.getColumnSortList());
JScrollPane scrollPane = new JScrollPane(table);