title: Java change color JLabel
body: <p>I know how to change a color in java from a JLabel object if you do it like this</p>
  
  <pre><code>JLabel label = new JLabel("label text");
  label.setForeground(Color.red);
  </code></pre>
  
  <p>but::</p>
  
  <p>i create my JLabes dynamic like this</p>
  
  <pre><code>center.add(new JLabel("Antwoord Vraag"+ (i +1) +": "+antwoord.get(i),SwingConstants.LEFT));
  </code></pre>
  
  <p>How could i change the color of a JLabel object without giving the object a name.</p>