Skip to main content

Custom Drag and Drop

No replies
Joined: 2006-03-27

I am trying to implement a drag-n-drop of a JPanel from one JInternalFrame to another, using 1.4-Swing methods (not awt). I am having the darnedest time trying to understand custom drags-and-drops. I have been over the Java tutorial multiple times, but have not had that "aha!" moment where I understand the concepts in a more generic fashion. Many of the examples assume that I simply want to DnD, say, the text of a JLabel. I don't want to DnD just the text... I'm looking to do the entire JComponent.

Does anyone have an example of a DnD of an entire JComponent Object? Specifically, I am trying to drag a JComponent from inside one JComponent into another.