use mouseaction to drag and drop javafx code example Example: mouse handler javafx public final double getY()