且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java:选定行的索引在排序时不会更改

更新时间:2023-12-05 09:31:16

底层模型不会改变顺序。只有视图更改。您可以在 Sun的教程中阅读更多相关信息。 。您将需要使用JTable.convertRowIndexToView()和JTable.convertRowIndexToModel()。

The underlying model does not change order. Only the view changes. You can read more about this in Sun's tutorial. You will need to use JTable.convertRowIndexToView() and JTable.convertRowIndexToModel().