I have a JList and want the user to be able to reorder the elements in the list using drag-n-drop (using my own ListModel and ListCellRenderer, if that makes any difference). Which Objects do I need to create, and how do I process the action?
+1
A:
There is an example here:
http://www.java2s.com/Code/Java/Swing-JFC/DragandDropJListandList.htm
There are several examples on that site.
Starkey
2010-09-27 13:54:04
This example doesn't do what I want, I want the JList to reorder its elements using DnD. The Example only enables dragging FROM the component.
Durandal
2010-09-27 14:03:15
http://www.java2s.com/Code/Java/Swing-JFC/DragListDemo.htm should work. It used to be on Sun's tutorial site.
Geoffrey Zheng
2010-09-27 15:04:37
Thank you Geoffrey, thats exactly what I was looking for.
Durandal
2010-09-27 15:41:26