private Collection<SimpleMatch> getSelectedFromTable() { ListSelectionModel lsm = matchTable.getSelectionModel(); Collection<SimpleMatch> selMatches = new HashSet<>(); for (int i = lsm.getMinSelectionIndex(); i <= lsm.getMaxSelectionIndex(); i++) { if (lsm.isSelectedIndex(i) && i < matches.size()) { selMatches.add(matches.get(i)); } } return selMatches; }