title: Adding and Align JLabels and JCheckBoxes to a JScrollPane dynamically
body: <p>My starting point is this: </p>
  
  <p><img src="https://i.stack.imgur.com/i5S5U.png" alt="enter image description here"></p>
  
  <p>The rectangle under the labels is a <code>JScrollPane</code>.</p>
  
  <p>Depending on the value of a variable I have to add JLabels and JCheckBoxes to the scrollpane.</p>
  
  <p>I read other threads but I can't do what I want.
  Can you help me?</p>
  
  <p>I have no code because I thought that I could do it with the NetBeans designer.
  The only thing that I can do is</p>
  
  <pre><code>JLabel label = new JLabel("New Label");
  JCheckBox cb = new JCheckBox("New CheckBox");
  jScrollPane1.add(label);
  jScrollPane1.add(cb);
  </code></pre>
  
  <p>but obviously it doesn't work.
  Thanks to Robby now I can add components.
  I need to know how to align them.
  For example a column of labels under the jLabel1, a column of checkboxes under the jLabel2 etc.. all with the same height and width.</p>