title: how to add imageviews to gridpane using a forloop
body: <p>here's my code.this prompts a exception saying "IllegalArgumentException: Children: duplicate children added: parent = Grid hgap=5.0, vgap=5.0, alignment=TOP_LEFT"</p>
  
  <p>File file = new File("D:\SERVER\Server Content\Apps\icons");</p>
  
  <pre><code>            File[] filelist1 = file.listFiles();
              ArrayList&lt;File&gt; filelist2 = new ArrayList&lt;&gt;();
              hb = new HBox();
  
              for (File file1 : filelist1) {
                  filelist2.add(file1);
  
              }
  
              System.out.println(filelist2.size());
  
                  for (int i = 0; i &lt; filelist2.size(); i++) {
                      System.out.println(filelist2.get(i).getName());
                      image = new Image(filelist2.get(i).toURI().toString());
  
                      pic = new ImageView();
                      pic.setFitWidth(130);
                      pic.setFitHeight(130);
  
                      gridpane.setPadding(new Insets(5));
                      gridpane.setHgap(5);
                      gridpane.setVgap(5);
                      pic.setImage(image);
                      hb.getChildren().add(pic);  
  
                  }
  </code></pre>