3 import java.io.IOException;
5 import java.util.ResourceBundle;
7 import javafx.fxml.FXML;
8 import javafx.fxml.FXMLLoader;
9 import javafx.fxml.Initializable;
10 import javafx.scene.Parent;
11 import javafx.scene.Scene;
12 import javafx.scene.control.TextField;
13 import javafx.stage.Modality;
14 import javafx.stage.Stage;
74 public static String
kysyNimi(Stage modalityStage, String oletus) {
79 FXMLLoader ldr =
new FXMLLoader(url);
81 Parent root = ldr.load();
85 Stage stage =
new Stage();
87 stage.setScene(
new Scene(root));
89 stage.setTitle(
"Kerho");
91 if ( modalityStage != null ) {
92 stage.initModality(Modality.WINDOW_MODAL);
93 stage.initOwner(modalityStage);
95 stage.initModality(Modality.APPLICATION_MODAL);
99 stage.setOnShown((e)-> {
107 }
catch (IOException e) {
108 System.err.println(e.toString());