@FXML private void initialize() throws IOException { URL fxml = TopScoreController.class.getResource("topscore.fxml"); for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) { FXMLLoader loader = new FXMLLoader(fxml); Pane scorePane = loader.load(); TopScoreController controller = loader.getController(); scoreControllers.add(controller); gridPane.add(scorePane, col, row); int rank = row * 3 + col; String name = "TBD#" + rank; String address = "00:01:02:03:04:0" + rank; controller.setTopScore(name, address, 0, rank); } } }