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
posted 13 years ago
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: