List of usage examples for javafx.scene.control Button setPrefSize
public void setPrefSize(double prefWidth, double prefHeight)
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(4, 3); flowPane.setPrefWrapLength(210);/*from ww w. j a 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); } 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 . jav 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); } 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);/*from w w w . j av a 2s . 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); } 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);// ww 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); } 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);/*from w w w .j av a2 s. com*/ 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);/*from w ww .j a va2 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.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 ww w .j a v a 2 s .com 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);// www .j a va 2 s . com 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(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20); flowPane.setPrefWrapLength(210);/*from w ww. j a v a 2 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.getOrientation()); 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 . com 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.getHgap()); Scene scene = new Scene(flowPane); primaryStage.setScene(scene); primaryStage.show(); }