code: public static Set<Integer> convertRowIndicesToView(
          JTable table, Iterable<? extends Integer> modelRows)
      {
          Set<Integer> viewRows = new LinkedHashSet<Integer>();
          for (Integer modelRow : modelRows)
          {
              int viewRow = table.convertRowIndexToView(modelRow);
              viewRows.add(viewRow);
          }
          return viewRows;
      }
docs: Convert all of the given model row indices to view row indices
  for the given table
  
  @param table The table
  @param modelRows The model row indices
  @return The view row indices