final JTree libraryTree = new JTree(libraryRoot);
gvhandler = new GraphViewTransfer(libraryTree);
libraryTree.setCellRenderer(libraryRoot);
libraryTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
libraryTree.setDragEnabled(true);
libraryTree.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if(e.getClickCount() == 2) {
Object obj = null;
if(libraryTree.getLeadSelectionPath() != null)
obj = libraryTree.getLeadSelectionPath().getLastPathComponent();