title: How to dynamically add JLabels to JPanel?
body: <p>I'm having a problem with this. I have a JPanel and normally I would create a JLabel like this:</p>
  
  <pre><code>JLabel lblNewLabel = new JLabel("New label");
  lblNewLabel.setBounds(0, 0, 135, 14);
  panel.add(lblNewLabel);
  </code></pre>
  
  <p>but I want each time I click a button, in that panel to be created a new JLabel with the same size, but with a different height possition. I tried:</p>
  
  <pre><code>panel.add(new JLabel(stringName));
  </code></pre>
  
  <p>but this way I don't get to set it's bounds. stringName I get from a JTextField.</p>