Java examples for JavaFX:Dialog
build JavaFX Input Dialog
import java.io.PrintWriter; import java.io.StringWriter; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextInputDialog; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; public class Main{ public static TextInputDialog buildInputDialog(String title, String header, String body) { TextInputDialog dialog = new TextInputDialog(); dialog.setTitle(title);/*from ww w .j a v a 2 s . c o m*/ dialog.setHeaderText(header); dialog.setContentText(body); return dialog; } }