publicclassTilePaneExampleextendsApplication{ @Override public void start(Stage stage) { //Creating an array of Buttons Button[] buttons = newButton[] { newButton("SunDay"), newButton("MonDay"), newButton("TuesDay"), newButton("WednesDay"), newButton("ThursDay"), newButton("FriDay"), newButton("SaturDay") }; //Creating a Tile Pane TilePane tilePane = newTilePane(); //Setting the orientation for the Tile Pane tilePane.setOrientation(Orientation.HORIZONTAL); //Setting the alignment for the Tile Pane tilePane.setTileAlignment(Pos.CENTER_LEFT); //Setting the preferred columns for the Tile Pane tilePane.setPrefRows(4); //Retrieving the observable list of the Tile Pane ObservableList list = tilePane.getChildren(); //Adding the array of buttons to the pane list.addAll(buttons); //Creating a scene object Scene scene = newScene(tilePane); //Setting title to the Stage stage.setTitle("Tile Pane Example"); //Adding scene to the stage stage.setScene(scene); //Displaying the contents of the stage stage.show(); } publicstatic void main(String args[]){ launch(args); } }