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 stage) {
    Arc arc = new Arc(0, 0, 50, 100, 0, 90);
    arc.setFill(Color.TRANSPARENT);
    arc.setStroke(Color.BLACK);//  w  w  w. j a  va  2 s. c  o  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) {
    Arc arc = new Arc(0, 0, 50, 100, 0, 90);
    arc.setFill(Color.TRANSPARENT);
    arc.setStroke(Color.BLACK);/*from   www . j av  a  2  s. c o m*/
    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:de.thomasbolz.renamer.Main.java

@Override
public void start(Stage primaryStage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("/de/thomasbolz/renamer/renamer.fxml"));
    final Properties properties = readPropertiesFromClasspath("renamer.properties");
    primaryStage.setTitle(properties.getProperty("app.name", "app.name") + " v"
            + properties.getProperty("app.version", "app.version"));
    primaryStage.setScene(new Scene(root, 1000, 800));
    primaryStage.getIcons().add(new Image("icon-16.png"));
    primaryStage.getIcons().add(new Image("icon-32.png"));
    primaryStage.getIcons().add(new Image("icon-64.png"));
    primaryStage.getIcons().add(new Image("icon-128.png"));
    primaryStage.getIcons().add(new Image("icon-256.png"));
    primaryStage.show();/*from   ww w. j av a  2s.  c  o m*/
}

From source file:MediaControl.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Embedded Media Player");
    Group root = new Group();
    Scene scene = new Scene(root, 540, 241);

    // create media player
    Media media = new Media((arg1 != null) ? arg1 : MEDIA_URL);
    MediaPlayer mediaPlayer = new MediaPlayer(media);
    mediaPlayer.setAutoPlay(true);//  ww  w .j  a  v  a2s  .co  m

    MediaControl mediaControl = new MediaControl(mediaPlayer);
    scene.setRoot(mediaControl);

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

From source file:Main.java

@Override
public void start(Stage stage) throws IOException {
    URL fxmlUrl = this.getClass().getClassLoader().getResource("resources/fxml/sayhello.fxml");

    // Load the FXML document
    VBox root = FXMLLoader.<VBox>load(fxmlUrl);
    Scene scene = new Scene(root);
    stage.setScene(scene);/*  www. j  a  v a2  s.  c o  m*/
    stage.setTitle("Hello FXML");
    stage.show();
}

From source file:com.omicronware.streamlet.Main.java

@Override
public void start(Stage stage) throws Exception {
    //register the different type of lists on ObjectFactory

    stage.setTitle("StreamLET - Omicronware Software (C)");
    stage.getIcons().add(new Image(
            getClass().getResource("/com/omicronware/streamlet/fxml/images/icon_96_96.png").toExternalForm()));
    stage.setOnHidden((WindowEvent event) -> {
        if (DATABASE != null) {
            DATABASE.close();/*from  w w  w .  j a  va2 s. c  o m*/
        }
        if (SETTINGS != null) {
            StoreObjectManager.getInstance().storeObject(SETTINGS);
        }
        Platform.exit();
        System.exit(0);
    });
    this.stage = stage;
    openDatabase();
}

From source file:com.ti.msp430.usb.hiddemo.JavaUSBFXMain.java

@Override
public void start(Stage primaryStage) throws Exception {

    Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));

    // StackPane root = new StackPane();
    // root.getChildren().add(btn);

    Scene scene = new Scene(root, 1000, 700);

    primaryStage.setTitle("HID Datapipe USB");
    primaryStage.setScene(scene);//from   www  .j  av  a 2  s . co m
    primaryStage.show();

}

From source file:Main.java

@Override
public void start(Stage stage) {
    Button okBtn = new Button("OK");
    Button cancelBtn = new Button("Cancel");

    cancelBtn.setPrefWidth(100);//  w  w  w.java 2  s . c  o m

    VBox root = new VBox();
    root.getChildren().addAll(okBtn, cancelBtn);

    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.setTitle("Overriding Node Sizes");
    stage.show();

}

From source file:gui.accessories.GraphPopup.java

private void initFX(JFXPanel fxPanel) {
    // This method is invoked on the JavaFX thread
    Stage window = new Stage();
    window.initModality(Modality.APPLICATION_MODAL);
    window.setTitle(labels.getString("PONTOS.VITORIA"));
    window.setMinWidth(500);/*ww  w.  ja  v a  2 s .  co m*/

    Chart chart = createStackedBarChart();
    chart.setAnimated(true);
    Scene scene = new Scene(chart);

    //show and tell
    window.setScene(scene);
    window.showAndWait();

    fxPanel.setScene(scene);
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Text msg = new Text("java2s.com");
    msg.setTextOrigin(VPos.TOP);//from   w ww.j a  v  a2  s.co  m
    msg.setFont(Font.font(24));

    Pane root = new Pane(msg);
    root.setPrefSize(500, 70);
    Scene scene = new Scene(root);

    stage.setScene(scene);
    stage.setTitle("Scrolling Text");
    stage.show();

    double sceneWidth = scene.getWidth();
    double msgWidth = msg.getLayoutBounds().getWidth();

    KeyValue initKeyValue = new KeyValue(msg.translateXProperty(), sceneWidth);
    KeyFrame initFrame = new KeyFrame(Duration.ZERO, initKeyValue);

    KeyValue endKeyValue = new KeyValue(msg.translateXProperty(), -1.0 * msgWidth);
    KeyFrame endFrame = new KeyFrame(Duration.seconds(3), endKeyValue);

    Timeline timeline = new Timeline(initFrame, endFrame);

    timeline.setCycleCount(Timeline.INDEFINITE);
    timeline.play();
}