title: How to display text coming from a dynamic List in JLabel
body: <p>in console we can do that like this :</p>
  
  <pre><code> for(int i = 0 ; i &lt;list.size();i++){
      System.out.print("name :"+list.get(i).getName());
      System.out.print("  year :"+list.get(i).getYear());
      System.out.println();
   }
  </code></pre>
  
  <p>if we know the size we can creat many label and do that</p>
  
  <blockquote>
    <p>label.setText("");</p>
  </blockquote>
  
  <p>what is the best way to do that in swing if we don't know the size of our list ?</p>