I have a stackPane
, filled with a Circle and a couple of lines.
I want to display a tooltip while hovering over the StackPane and the tooltip should contain the X/Y coords
of the mouse.
I know how to get the Coords of the mouse, but I'm unable to find a way of showing the tool tip.
Can any of ou guys help me with that?..
try this...
Tooltip tp = new Tooltip("at stack tool");
stackpane.setOnMouseEntered(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent t) {
Node node =(Node)t.getSource();
tp.show(node, FxApp.stage.getX()+t.getSceneX(), FxApp.stage.getY()+t.getSceneY());
}
});