[Logo]
Forums Register Login
how to use drag and drop for command buttons
hi all
i am doing an application of network simulator
using swing
i have 15 command buttons (with icons on them)on the left side of the form.
i have use drag and drop for these command buttons
and place them on the form and draw lines between any no. of buttons(many-to-many)
please someone help me with the code
thanks in advance
regards
Rajasekhar
Drag�n Drop is not simple. You must use DragSource, DragGestureListener and DropTargetListener, etc in pachage java.awt.dnd. and java.awt.datatransfer.DataFlavor.
To make your button (button) be able to be DnD.

Lay a BackgroundPanel on the left side of the form. To make the panel be able to receive drop:

This thread has been viewed 2000 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 15, 2018 00:02:15.