How to iteratively add Components to a Swing GroupLayout ParallelGroup?
Is there a way to iterate over a List of Components and add them to a ParallelGroup in Swing GroupLayout? It seems difficult because there is no method to get hold of the ParallelGroup. Here is the code generating a List of Components (in this case, JCheckBoxes). List<JCheckBox> listCustomiseJCB = new ArrayList<>(); for (int w = 0; w < initialCMTableColumns.size(); w++) { String heading = (String)initialCMTableColumns.get(w).getHeaderValue(); listCustomiseJCB.add(new JCheckBox(heading)); } The List is working, but how can I iterate over the List to insert each JCheckbox into a GroupLayout's