List of usage examples for javafx.scene.control Button getLayoutBounds
public final Bounds getLayoutBounds()
From source file:Main.java
@Override public void start(Stage stage) { Button b1 = new Button("Close"); VBox root = new VBox(); root.getChildren().addAll(b1);//from w ww .j av a 2s.com Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle(""); stage.show(); System.out.println("b1(layoutBounds)=" + b1.getLayoutBounds()); System.out.println("b1(boundsInLocal)=" + b1.getBoundsInLocal()); }
From source file:Main.java
@Override public void start(Stage stage) { Button b1 = new Button("Close"); b1.setEffect(new DropShadow()); Button b3 = new Button("Close"); b3.setEffect(new DropShadow()); b3.setRotate(30);//from ww w . j a v a 2 s. c om VBox root = new VBox(); root.getChildren().addAll(b1, b3); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("Testing LayoutBounds"); stage.show(); System.out.println("b1=" + b1.getLayoutBounds()); System.out.println("b3=" + b3.getLayoutBounds()); }