Example usage for javafx.stage Stage show

List of usage examples for javafx.stage Stage show

Introduction

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

Prototype

@Override
public final void show() 

Source Link

Usage

From source file:Main.java

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

    final Circle circ = new Circle(40, Color.RED);

    System.out.println(circ.getCenterX());

    final Group root = new Group(circ);
    final Scene scene = new Scene(root, 400, 300);

    primaryStage.setScene(scene);/*  w  ww .j a  va2 s.c  om*/
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Arc arc = new Arc(0, 0, 50, 100, 0, 90);
    arc.setFill(Color.GRAY);/*from  w w w  . j a v a2s . co m*/
    arc.setStroke(Color.BLACK);
    arc.setType(ArcType.ROUND);

    HBox box = new HBox(arc);

    Scene scene = new Scene(box);
    stage.setScene(scene);
    stage.setTitle("Test");
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    ChoiceBox choiceBox = new ChoiceBox(cursors);

    System.out.println(choiceBox.getConverter());
    VBox box = new VBox();
    box.getChildren().add(choiceBox);/*from ww  w. j a v a  2s.c o m*/
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.initStyle(StageStyle.UTILITY);
    Text text = new Text("!");
    text.setFont(new Font(40));
    VBox box = new VBox();
    box.getChildren().add(text);/* w w  w  .j  a va2s.  c  om*/
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.initStyle(StageStyle.DECORATED);
    Text text = new Text("!");
    text.setFont(new Font(40));
    VBox box = new VBox();
    box.getChildren().add(text);/*w w w.  ja v a  2  s  . co  m*/
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 260, 80);
    stage.setScene(scene);//  ww  w .  ja va 2 s .c o  m

    Group g = new Group();

    ProgressIndicator p1 = new ProgressIndicator();
    p1.setProgress(0.25F);

    g.getChildren().add(p1);

    scene.setRoot(g);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Arc arc = new Arc(0, 0, 50, 100, 0, 90);
    arc.setFill(Color.TRANSPARENT);
    arc.setStroke(Color.BLACK);/*  ww  w .jav  a 2  s . co  m*/
    arc.setType(ArcType.ROUND);

    HBox box = new HBox(arc);

    Scene scene = new Scene(box);
    stage.setScene(scene);
    stage.setTitle("Test");
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    String yahooURL = "http://www.java2s.com";
    Button openURLButton = new Button("Go!");
    openURLButton.setOnAction(e -> getHostServices().showDocument(yahooURL));

    Scene scene = new Scene(openURLButton);
    stage.setScene(scene);/*from  www.ja  va 2s .  co  m*/
    stage.setTitle("Knowing the Host");
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Arc arc = new Arc(0, 0, 50, 100, 0, 90);
    arc.setFill(Color.TRANSPARENT);
    arc.setStroke(Color.BLACK);/*from   w w  w  .  j a v a  2s.  c om*/
    arc.setType(ArcType.CHORD);

    HBox box = new HBox(arc);

    Scene scene = new Scene(box);
    stage.setScene(scene);
    stage.setTitle("Test");
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    ChoiceBox choiceBox = new ChoiceBox(cursors);

    System.out.println(choiceBox.getSelectionModel());
    VBox box = new VBox();
    box.getChildren().add(choiceBox);/*w w  w  .  ja va  2  s . c o  m*/
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}