private void restoreSelection(@NotNull List<Object> sel) {
    ListSelectionModel sm = table.getSelectionModel();
    sm.clearSelection();
    for (Object o : sel) {
      int idx = -1;
      for (int i = 0, e = table.getModel().getRowCount(); i < e; ++i) {
        if (table.getModel().getValueAt(i, 0) == o) {
          idx = i;
          break;
        }
      }
      sm.addSelectionInterval(idx, idx);
    }
    if (sm.isSelectionEmpty() && table.getRowCount() > 0) {
      sm.setSelectionInterval(0, 0);
    }
    sm.setValueIsAdjusting(false);
  }
private void restoreSelection(@NotNull List<Object> sel)