définir un indice sur un champ de texte dans Javafx

userTextField.setPromptText("name"); //to set the hint text
userTextField.getParent().requestFocus(); //to not setting the focus on that node so that the hint will display immediately
Envious Elk