@@ -0,0 +1,2110 @@
+package edu.chl.proton.model;%0A%0Aimport com.jfoenix.controls.JFXButton;%0Aimport com.jfoenix.controls.JFXTextField;%0Aimport javafx.geometry.Pos;%0Aimport javafx.scene.Scene;%0Aimport javafx.scene.layout.VBox;%0Aimport javafx.stage.Modality;%0Aimport javafx.stage.Stage;%0Aimport javafx.stage.StageStyle;%0Aimport javafx.stage.Window;%0A%0A/**%0A * Anton Levholm%0A * Created by antonlevholm on 2017-05-23.%0A */%0Apublic class TextPrompt %7B%0A    private String result;%0A    private boolean clicked = false;%0A%0A    public TextPrompt(Window owner, String title, String input) %7B%0A        addPrompt(owner, title, input);%0A    %7D%0A%0A    public TextPrompt(Window owner, String title) %7B%0A        addPrompt(owner, title, %22%22);%0A    %7D%0A%0A    private void addPrompt(Window owner, String title, String input) %7B%0A        final Stage dialog = new Stage();%0A%0A        dialog.setTitle(title);%0A        dialog.initOwner(owner);%0A        dialog.initStyle(StageStyle.UTILITY);%0A        dialog.initModality(Modality.WINDOW_MODAL);%0A        dialog.setX(owner.getX() + owner.getWidth()/2);%0A        dialog.setY(owner.getY() + 50);%0A%0A        final JFXTextField textField = new JFXTextField();%0A        final JFXButton submitButton = new JFXButton(%22Submit%22);%0A        submitButton.setDefaultButton(true);%0A        submitButton.setOnAction(t -%3E %7B%0A            clicked();%0A            dialog.close();%0A        %7D);%0A        submitButton.getStylesheets().add(%22edu/chl/proton/view/style.css%22);%0A        submitButton.getStyleClass().add(%22button%22);%0A        textField.setMinHeight(JFXTextField.USE_PREF_SIZE);%0A        textField.insertText(0, input);%0A%0A        final VBox layout = new VBox(10);%0A        layout.setAlignment(Pos.CENTER_RIGHT);%0A        layout.setStyle(%22-fx-background-color: azure; -fx-padding: 10;%22);%0A        layout.getChildren().setAll(%0A                textField,%0A                submitButton%0A        );%0A%0A        dialog.setScene(new Scene(layout));%0A        dialog.showAndWait();%0A%0A        if (clicked) result = textField.getText();%0A        else result = null;%0A    %7D%0A%0A    private void clicked() %7B%0A        clicked = true;%0A    %7D%0A%0A    public String getResult() %7B%0A        return result;%0A    %7D%0A%7D

add TextPrompt class to take input from user