I\'ve tried this:
public void removeSelectedFromTable(JTable from) { int[] rows = from.getSelectedRows(); TableModel tm= from.getModel(); while(
The stream solution above doesn't take into account sorting, it may be fixed this way:
IntStream.of(table.getSelectedRows()) .boxed().map(i -> table.convertRowIndexToModel(i)) .sorted(Collections.reverseOrder()) .forEach(((DefaultTableModel)table.getModel())::removeRow);