title: JavaFX 8 Duplicate children after getChildren().clear()
body: <p>Im clearing the Gridpane of all children, then adding children again to the Gridpane yet it says that there are duplicates.    </p>
  
  <pre><code>public void render(){
      boardPane.getChildren().clear();
      for(int x = 0; x &lt; xSize; x++){
          for(int y = 0; y &lt; ySize; y++){
              boardPane.add(blockBoard[x][y], x, y);
          }
      }
  }
  </code></pre>
  
  <p>blockBoard[x][y] contains objects that are replaced every render cycle.</p>
  
  <pre><code>Exception in thread "JavaFX Application Thread"    
  java.lang.IllegalArgumentException: Children: 
  duplicate children added:     parent = Grid hgap=0.0, vgap=0.0,
  alignment=TOP_LEFT
  at javafx.scene.Parent$2.onProposedChange(Parent.java:454)
  at   com.sun.javafx.collections.VetoableListDecorator.add
  (VetoableListDecorator.java:206)
  at javafx.scene.layout.GridPane.add(GridPane.java:965)
  at tetris.Game.render(Game.java:121)
  </code></pre>