使用抽象表模型获取JTable中选定的行
JTable
AbstractTableModel
JCheckBox
List<Integer> selectedRows = new ArrayList<Integer>();for(int i = 0; i < table.getRowCount(); i++) { if((Boolean) table.getValuAt(i, 0)) { selectedRows.add(i); }}
JCheckBox
(SELECTED/DESELECTED)
JCheckBox
table.getSelectedRow(..)
JCheckBox
守候你守候我
相关分类