List of usage examples for javafx.scene.shape Rectangle setLayoutX
public final void setLayoutX(double value)
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);/*from w ww. j av a 2 s . c o m*/ Rectangle rect = new Rectangle(100, 100); rect.setLayoutX(50); rect.setLayoutY(50); rect.setStyle("-fx-fill: red; "); ((Group) scene.getRoot()).getChildren().add(rect); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);// w w w. j av a2 s.c om Rectangle rect = new Rectangle(100, 100); rect.setLayoutX(50); rect.setLayoutY(50); rect.getStrokeDashArray().addAll(1.0, 13.0); ((Group) scene.getRoot()).getChildren().add(rect); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);// w w w. j a v a2 s . com Rectangle rect = new Rectangle(100, 100); rect.setLayoutX(50); rect.setLayoutY(50); rect.setStrokeLineCap(StrokeLineCap.BUTT); ((Group) scene.getRoot()).getChildren().add(rect); stage.show(); }