table.setColumnSelectionAllowed(false);
table.setRowSelectionAllowed(true);
table.setAutoCreateRowSorter(true);
FormattedDoubleComparator comparator = FormattedDoubleComparator
.getInstance();
rowSorter = new TableRowSorter<PeriodAnalysisDataTableModel>(model);
for (int i = 0; i < model.getColumnCount(); i++) {
rowSorter.setComparator(i, comparator);
}