I\'m using JavaFx for a little app and a want to display a tooltip on a textArea when the user is clicking on a \"help\" button.
No problem for linking a tootltip to
The following show a tooltip over control
.
If control
has a Tooltip
assigned to, this tooltip is not chnaged.
public static void showOneTimeTooltip(Control control, String tooltipText) {
Point2D p = control.localToScreen(5 , 5);
final Tooltip customTooltip = new Tooltip(tooltipText);
customTooltip.setAutoHide(false);
customTooltip.show(control,p.getX(),p.getY());
PauseTransition pt = new PauseTransition(Duration.millis(2000));
pt.setOnFinished(e->{
customTooltip.hide();
});
pt.play();
}