static Pair fillTableWithData_makeData(L rows, S... colNames) { Object[][] data = new Object[rows.size()][]; int w = 0; for (int i = 0; i < rows.size(); i++) { L l = rows.get(i); Object[] r = new Object[l.size()]; for (int j = 0; j < l.size(); j++) { O o = l.get(j); if (o instanceof BufferedImage) o = imageIcon((BufferedImage) o); ifclass RGBImage if (o instanceof RGBImage) o = imageIcon((RGBImage) o); endif r[j] = o; } data[i] = r; w = Math.max(w, l.size()); } O[] columnNames = new O[w]; for (int i = 0; i < w; i++) columnNames[i] = i < l(colNames) ? colNames[i] : "?"; ret pair(data, columnNames); }