Hey guys,
This isn’t relevant to games, at all, but I can’t seem to find any answers on google.
I have a JTable which gets it TableModel changed to another TableModel via the setModel() function on the JTable, but this results in an index out of bounds, because the new TableModel has fewer entries than the old one does.
How on earth do I fix this? It seems like the model is being changed and everything, but for whatever reason, then the JTable decides not to use the old number of entries when calling getValueAt() on the TableModel.
Anyone knows of any solutions to this? That doesn’t involve switching table instead of table model. xD