且构网

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

通过AbstractTableModel获取选定的行

更新时间:2023-01-13 20:21:01

TableModel只关注自身对于数据,ListSelectionModel关注当前选择的内容,因此,不能从TableModel中获取所选行。

The TableModel only concerns itself with the data, the ListSelectionModel concerns itself with what is currently selected, so, no you can't get the selected row from the TableModel.