I have a TextField for which I want to show Tooltip in some circumstances.
After checking, I run the following code:
textFieldUsername.setTooltip(new Tooltip("Enter username!")); textFieldUsername.getTooltip().setAutoHide(true); textFieldUsername.getTooltip().show(textFieldUsername, 1, 1);
Therefore, when someone tries to log in with an empty username, he receives a Tooltip request by the "username" TextField .
But when it comes to action, Tooltip appears in the upper left corner of the screen.
Should I calculate the coordinates of my scene and then add my TextField encoders to them, or is there a way to set these arguments 1, 1 from the show() call relative to the relative position of the TextField ?
source share