For use JavaFx TextInput Dialog
B4X:
Dim jo As JavaObject
jo.InitializeNewInstance("javafx.scene.control.TextInputDialog", Null)
jo.RunMethodJO("setTitle", Array As String("Sample Title"))
jo.RunMethod("setHeaderText", Array As String("Sample Text"))
If jo.RunMethodjo("showAndWait", Null).RunMethod("isPresent", Null)=True Then
'ok button pressed
Dim txt As String=jo.RunMethodJO("getEditor", Null).RunMethod("getText", Null)
Log(txt)
End If