Example usage for javafx.stage Stage setTitle

List of usage examples for javafx.stage Stage setTitle

Introduction

In this page you can find the example usage for javafx.stage Stage setTitle.

Prototype

public final void setTitle(String value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Text Fonts");

    Group rectangleGroup = new Group();
    Scene scene = new Scene(rectangleGroup, 550, 250);

    Rectangle rect = new Rectangle();
    rect.setWidth(100);/*from ww  w .  ja  va2s . c  o m*/
    rect.setHeight(100);

    rect.setScaleY(2);
    rectangleGroup.getChildren().add(rect);

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

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 va  2  s .  c o  m*/
    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) {
    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 ww.  j a  va  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) {
    primaryStage.setTitle("Hello World!");
    Button btn = new Button();
    btn.setText("Say 'Hello World'");
    btn.setOnAction(new EventHandler<ActionEvent>() {
        @Override/*  ww w.j a  v a 2  s  .com*/
        public void handle(ActionEvent event) {
            System.out.println("Hello World!");
        }
    });

    StackPane root = new StackPane();
    root.getChildren().add(btn);
    primaryStage.setScene(new Scene(root, 300, 250));
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Text Fonts");

    Group rectangleGroup = new Group();
    Scene scene = new Scene(rectangleGroup, 550, 250);

    Rectangle rect = new Rectangle();
    rect.setWidth(100);//from  w w w  .  j  a v  a2  s.c o  m
    rect.setHeight(100);
    rect.setTranslateX(135);
    rect.setTranslateY(11.0);

    rectangleGroup.getChildren().add(rect);

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

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Text Fonts");

    Group g = new Group();
    Scene scene = new Scene(g, 550, 250);

    Text text1 = new Text();
    text1.setText("Hello World!");
    text1.setX(50);//from w ww  .  j ava2  s .  c  om
    text1.setY(50);
    text1.setFill(Color.RED);

    g.getChildren().add(text1);

    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);

    Path path = new Path();

    QuadCurve quad = QuadCurveBuilder.create().startX(50).startY(50).endX(150).endY(50).controlX(125)
            .controlY(150).translateY(path.getBoundsInParent().getMaxY()).strokeWidth(3).stroke(Color.BLACK)
            .fill(Color.WHITE).build();

    root.getChildren().add(quad);//from www  .j  a va2  s  . c  o  m

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

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("BorderPane Test");

    //Creating StackPane
    StackPane sp = new StackPane();

    ////  ww w.ja v a  2s .  c om
    Label lbl = new Label("JavaFX 2 StackPane");
    sp.getChildren().add(lbl);
    Button btn = new Button("Button");
    sp.getChildren().add(btn);

    //Adding StackPane to the scene
    Scene scene = new Scene(sp, 300, 200);
    primaryStage.setScene(scene);
    primaryStage.show();
}

From source file:Main.java

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

    VBox vbox = new VBox();
    ListView list = new ListView();
    VBox.setVgrow(list, Priority.ALWAYS);
    vbox.getChildren().addAll(new Label("Names:"), list);

    scene.setRoot(vbox);

    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  w  w .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();
}