Example usage for javafx.scene.layout FlowPane getChildren

List of usage examples for javafx.scene.layout FlowPane getChildren

Introduction

In this page you can find the example usage for javafx.scene.layout FlowPane getChildren.

Prototype

@Override
public ObservableList<Node> getChildren() 

Source Link

Usage

From source file:Main.java

License:asdf

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);/*from  w  w  w .j a  v a2 s  .c  o m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    FlowPane flow = new FlowPane();
    flow.setVgap(8);
    flow.setHgap(4);
    flow.setPrefWrapLength(300); // preferred width = 300
    for (int i = 0; i < 10; i++) {
        flow.getChildren().add(new Button("asdf"));
    }
    scene.setRoot(flow);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

License:asdf

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);/*from  ww  w .j av a 2 s .com*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    FlowPane flow = new FlowPane(Orientation.VERTICAL);
    flow.setVgap(8);
    flow.setHgap(4);
    flow.setPrefWrapLength(300); // preferred width = 300
    for (int i = 0; i < 10; i++) {
        flow.getChildren().add(new Button("asdf"));
    }
    scene.setRoot(flow);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(4, 3);
    flowPane.setPrefWrapLength(210);/*from  w  ww.  j  ava 2s . com*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL);
    flowPane.setPrefWrapLength(210);// w  w  w .  j  ava 2  s  .  c  om
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/*w  ww . j a  v a2  s.  c  o m*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/*  w  ww.j a v  a 2  s  .  c  o m*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    flowPane.setOrientation(Orientation.HORIZONTAL);

    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/*w w  w .ja  v a2s  .  c  o m*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    flowPane.setRowValignment(VPos.BASELINE);

    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/* www.  j ava2 s  . co m*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    System.out.println(flowPane.getPrefWrapLength());

    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/*from   w w w  .  j  a va 2 s  .  c om*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    System.out.println(flowPane.getVgap());

    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/*from  ww  w .j  a v a 2 s . c o  m*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    System.out.println(flowPane.getColumnHalignment());

    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}