Source Code : Drag capabilities: JList
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Drag capabilities: JList

import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.ListSelectionModel;
public class DragTest14 extends JFrame {
JList jl;
String[] items = { "Java", "C", "C++", "Lisp", "Perl", "Python" };
public DragTest14() {
super("Drag Test 1.4");
setSize(200, 150);
setDefaultCloseOperation(EXIT_ON_CLOSE);
jl = new JList(items);
jl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jl.setDragEnabled(true);
getContentPane().add(new JScrollPane(jl), BorderLayout.CENTER);
setVisible(true);
}
public static void main(String args[]) {
new DragTest14();
}
}
Thank with us