I have a table where the first column contains Strings and the second contains doubles.
stars = new StarDatabase(path);
Object[][] data = new Object[stars.size()][2];
int i = 0;
for (String name : stars.keySet()) {
data[i][0] = name;
data[i++][1] = stars.get(name).period;
}
StarsTable = new JTable(data, StarsColumnNames);
StarsTable.setAutoCreateRowSorter(true);
The doubles are sorted as strings, so 1 < 15 < 2 < 25 < 3. How can I fix this?