List of usage examples for javafx.scene Group Group
public Group()
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Label Sample"); stage.setWidth(400);/*from w ww .ja va 2 s. c om*/ stage.setHeight(180); HBox hbox = new HBox(); Label label1 = new Label("Search long long long long long long long long long "); label1.setPrefWidth(100); label1.setWrapText(true); hbox.setSpacing(10); hbox.getChildren().add((label1)); ((Group) scene.getRoot()).getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Rectangle r = new Rectangle(); r.setX(50);/*w ww .j av a 2 s. com*/ r.setY(50); r.setWidth(200); r.setHeight(100); r.setArcWidth(20); r.setArcHeight(20); root.getChildren().add(r); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);// w w w.ja v a2 s. c om stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setTextAlignment(TextAlignment.CENTER); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Shapes"); Group root = new Group(); Scene scene = new Scene(root, 300, 300, Color.WHITE); Ellipse bigCircle = new Ellipse(20, 20); bigCircle.setCenterX(20);/*from ww w .j av a 2s .c o m*/ bigCircle.setCenterY(20); bigCircle.setRadiusX(10); bigCircle.setRadiusY(10); root.getChildren().add(bigCircle); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { Group root = new Group(); Scene scene = new Scene(root, 551, 400); Group buttonGroup = new Group(); Rectangle buttonArea = RectangleBuilder.create().arcWidth(15).arcHeight(20).fill(new Color(0, 0, 0, .55)) .x(0).y(0).width(60).height(30).stroke(Color.BLACK).build(); buttonGroup.getChildren().add(buttonArea); root.getChildren().add(buttonGroup); primaryStage.setScene(scene);/* www . j av a 2 s . c o m*/ primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, Color.web("0x0000FF")); Circle circle = new Circle(); circle.setCenterX(100.0f);//from w w w .ja va 2s . c o m circle.setCenterY(100.0f); circle.setRadius(50.0f); root.getChildren().add(circle); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { Group group = new Group(); Rectangle rect = new Rectangle(20, 20, 200, 200); FadeTransition ft = new FadeTransition(Duration.millis(5000), rect); ft.setFromValue(1.0);// w w w . ja va 2s. c o m ft.setToValue(0.0); ft.play(); group.getChildren().add(rect); Scene scene = new Scene(group, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { Group group = new Group(); Path spade = new Path(); spade.getElements().add(new MoveTo(25.0f, 0.0f)); spade.getElements()/*from ww w . ja v a 2 s. c o m*/ .add(QuadCurveToBuilder.create().controlX(40.0f).controlY(50.0f).x(27.0f).y(30.0f).build()); group.getChildren().add(spade); Scene scene = new Scene(group, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Shapes"); Group root = new Group(); Scene scene = new Scene(root, 300, 300, Color.WHITE); Ellipse bigCircle = new Ellipse(); bigCircle.setCenterX(20);/* ww w .jav a 2 s. c o m*/ bigCircle.setCenterY(20); bigCircle.setRadiusX(10); bigCircle.setRadiusY(10); System.out.println(bigCircle.centerXProperty().doubleValue()); root.getChildren().add(bigCircle); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Shapes"); Group root = new Group(); Scene scene = new Scene(root, 300, 300, Color.WHITE); Ellipse bigCircle = new Ellipse(20, 20); bigCircle.setCenterX(20);//from w w w . j a v a 2 s .c o m bigCircle.setCenterY(20); bigCircle.setRadiusX(10); bigCircle.setRadiusY(10); System.out.println(bigCircle.centerXProperty().doubleValue()); root.getChildren().add(bigCircle); primaryStage.setScene(scene); primaryStage.show(); }