Decision
When your background process is faced with a situation where it requires the user to request input, use the FutureTask executed in the Platform.runLater in the showAndWait dialog prompt in the JavaFX application thread. In the background, use futureTask.get to pause the background process until the user enters the necessary values ββto allow the process to continue.
Code snippet example
Here is the gist of the code for this approach, which can be placed inside the call method of your background process:
String nextText = readLineFromSource(); if ("MISSING".equals(nextText)) { updateMessage("Prompting for missing text"); FutureTask<String> futureTask = new FutureTask( new MissingTextPrompt() ); Platform.runLater(futureTask); nextText = futureTask.get(); } ... class MissingTextPrompt implements Callable<String> { private TextField textField; @Override public String call() throws Exception { final Stage dialog = new Stage(); dialog.setScene(createDialogScene()); dialog.showAndWait(); return textField.getText(); } ... }
Application example
I created a small, complete, sample application to demonstrate this approach.
Sample application output:

Sample Output Explanation
Lines read without missing values ββare simply brown. Lines with a quick value entered have a pale green background. Fourteen lines were read, the background task has already been suspended on the 6th line, where the value is missing. The user was prompted to indicate a missing value (to which the user entered xyzzy ), then the process continued until line 14 disappeared and the background task was paused again and a prompt dialog box appeared.
jewelsea Feb 19 '13 at 21:36 2013-02-19 21:36
source share