create JavaFX Dialog Stage - Java JavaFX

Java examples for JavaFX:Dialog

Description

create JavaFX Dialog Stage

Demo Code


//package com.java2s;
import javafx.stage.Modality;
import javafx.stage.Stage;

public class Main {
    public static void main(String[] argv) throws Exception {
        String title = "java2s.com";
        System.out.println(createDialogStage(title));
    }/*ww w . j  av  a 2 s  .  c om*/

    public static Stage createDialogStage(String title) {
        Stage stage = new Stage();
        stage.setTitle(title);
        stage.initModality(Modality.APPLICATION_MODAL);
        stage.setResizable(false);
        return stage;
    }
}

Related Tutorials