2
votes

I'm working on Drag and Drop. I'm dragging some buttons from a VBox to another VBox. What I'm seeing now is that the OnDragEntered event is fire only when the mouse cursor enters in the border of the target.

My question is: how can I have a Drag Event ( or another event ) fired when the source button border overlaps the target list border?

thank you very much

1

1 Answers

1
votes

drag-and-drop doesn't support that by itself. You can't just drag shapes and receive onDragEvent when they collide with others.

You need to implement bounds collision during drag by yourself, there is a good example here: Checking Collision of Shapes with JavaFX