Package javafx.scene.layout

Examples of javafx.scene.layout.GridPane


                             .autoNightMode(true)
                             .build();
    }

    @Override public void start(Stage stage) {
        GridPane pane = new GridPane();
        pane.setPadding(new Insets(10, 10, 10, 10));
        pane.setHgap(10);
        pane.setVgap(10);
        pane.add(clock1, 0, 0);       
        pane.add(clock2, 0, 1);
        pane.add(clock3, 1, 0);
        pane.add(clock4, 1, 1);
        pane.add(clock5, 2, 0);
        pane.add(clock6, 2, 1);
       

        //Scene scene = new Scene(pane, 400, 400, Color.rgb(195, 195, 195));
        Scene scene = new Scene(pane, Color.BLACK);

        stage.setTitle("Clock Demo");
        stage.setScene(scene);
        stage.show();

        //clock.setMajorTickHeight(30);

        calcNoOfNodes(scene.getRoot());
        System.out.println("No. of nodes in scene: " + noOfNodes);
       
        for (Node node : pane.getChildren()) {
            ((Clock) node).setRunning(true);
        }
    }
View Full Code Here


 
  @PostConstruct
  void init(BorderPane parent, @FXMLLoader FXMLLoaderFactory factory) {
    try {
      FXMLBuilder<GridPane> builder = factory.loadRequestorRelative("ConfigurationEditor.fxml");
      GridPane p = builder.load();
      parent.setTop(p);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.GridPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.