I imported javax.swing.table.TableRowSorter;
used it in the table model. It works properly with Strings, but with numbers it orders everything in a weird way, as shown in the picture. I'm a noob at coding so I don't really know how to properly google for such an issue yet.
DefaultTableModel model = new DefaultTableModel();
table.setAutoCreateRowSorter(true);
Not sure if you still need more code. It is a mess tbh, as object oriented coding came up in school after i started this.
