I\'ve tried this:
public void removeSelectedFromTable(JTable from) { int[] rows = from.getSelectedRows(); TableModel tm= from.getModel(); while(
removeRows: { int[] lines = t.getSelectedRows(); if(lines.length==0) break removeRows; for(int i=0; i=0; i--) { dtm.removeRow(lines[i]); } }
Working with sorting, moving columns, multiple selection, etc.