public static Optional<String> createInputDialog(final Window owner,final String title,final String label){
  final TextInputDialog dialog=new TextInputDialog();
  dialog.setTitle(title);
  dialog.setHeaderText(null);
  dialog.setContentText(label);
  dialog.initOwner(owner);
  return dialog.showAndWait();
}

public static Optional < String > createInputDialog ( final Window owner , final String title , final String label ) { final TextInputDialog dialog = new TextInputDialog ( ) ; dialog . setTitle ( title ) ; dialog . setHeaderText ( null ) ; dialog . setContentText ( label ) ; dialog . initOwner ( owner ) ; return dialog . showAndWait ( ) ; }
asks the user for input .
