I am writing a JavaFX application and I added a Canvas
to a window.
Now when I register events for mouse move and mouse pressed for the canvas, I can react to mouse moving and mouse button being pressed. However, there is no mouse move event as long as a button is pressed.
Suppose I wanted to implement a simple MS Paint style painting operation where the user presses a mouse button and drags the mouse over the canvas to draw. Would I try to do this with mouse move and mouse pressed events, or would this be a matter of DragEvent
s?
I am asking because for some reason I thought DragEvent
was for real drag and drop and not every operation that involved dragging.