How to open Text Input Dialog Box, when a TextArea gets focus in Javafx?
问题 I have tried the following code, to open a text input dialog box, whenever the textarea gets focused. TextArea address = new TextArea(); address.focusedProperty().addListener(new ChangeListener<Boolean>() { @Override public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue) { if (newPropertyValue) { System.out.println("Textfield on focus"); TextInputDialog dialog = new TextInputDialog("walter"); dialog.setTitle("Text Input Dialog");