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 stage) {
    VBox box = new VBox();
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);/*  ww w .  j ava2s.com*/

    Line line = new Line();
    line.setStartX(0.0f);
    line.setStartY(0.0f);
    line.setEndX(100.0f);
    line.setEndY(100.0f);

    System.out.println(line.startXProperty());

    box.getChildren().add(line);

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

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(400);// w  w  w .j  av  a 2s .  com
    stage.setHeight(180);

    HBox hbox = new HBox();

    Label label1 = new Label("Search");
    label1.setFont(new Font("Arial", 30));

    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 stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);/*from  w ww . j  a va 2  s. c  o m*/
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.getText());
    button.setTooltip(toolTip);

    ((Group) scene.getRoot()).getChildren().add(button);

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

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);//  w  w w.  j  ava  2 s  . c  o  m
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.getFont());
    button.setTooltip(toolTip);

    ((Group) scene.getRoot()).getChildren().add(button);

    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, 300, 150);
    stage.setScene(scene);/* w  w  w  .j  a va 2 s  . co  m*/
    stage.setTitle("Sample");

    Task<Void> task = new Task<Void>() {
        @Override
        protected Void call() throws Exception {
            return null;
        }
    };

    task.run();
    System.out.println(task.getMessage());

    stage.show();
}

From source file:analyzer.code.FXMLAnalyzerController.java

@FXML
private void settingMunuItem() throws FileNotFoundException, IOException {
    FXMLLoader loader = new FXMLLoader(getClass().getResource("FXMLSetting.fxml"));
    try {/*from   w  w  w . j a va2  s . co m*/
        AnchorPane pane = (AnchorPane) loader.load();
        fxmlsc = loader.getController();
        fxmlsc.setAnalyzer(this);
        Scene scene = new Scene(pane);
        Stage stage = new Stage();
        stage.setScene(scene);
        stage.setTitle("??");
        stage.show();
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Text text = new Text("Transparent!");
    text.setFont(new Font(40));

    MotionBlur mb = new MotionBlur();
    mb.setRadius(15.0);/*www .  j av  a 2s  .co m*/
    mb.setAngle(-30.0);

    text.setEffect(mb);

    VBox box = new VBox();
    box.getChildren().add(text);
    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) {
    ChoiceBox<String> choiceBox = new ChoiceBox<String>();
    choiceBox.setItems(cursors);// w  w  w.j  a  v  a  2 s. c  om

    SingleSelectionModel ssm = choiceBox.getSelectionModel();
    choiceBox.setSelectionModel(ssm);

    VBox box = new VBox();
    box.getChildren().add(choiceBox);
    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) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);//  w w w .j  a v a 2  s.co  m
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.isWrapText());
    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) {
    Group group = new Group();

    Rectangle rect = new Rectangle(20, 20, 200, 200);

    rect.setStrokeWidth(2);/*from   w  w  w .  j a va 2  s.  co  m*/

    rect.setStroke(Color.RED);
    rect.setStrokeWidth(1.5);
    rect.getStrokeDashArray().addAll(3.0, 7.0, 3.0, 7.0);

    group.getChildren().add(rect);

    Scene scene = new Scene(group, 300, 200);
    primaryStage.setScene(scene);
    primaryStage.show();
}