java中如何获取jtable里被鼠标点击过(选中)的行?

2025-01-01 11:27:32
推荐回答(1个)
回答1:

int[] selection = table.getSelectedRows();
for (int i = 0; i < selection.length; i++) {
selection[i] = table.convertRowIndexToModel(selection[i]);
}