private void jTree1ValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_jTree1ValueChanged
        TreePath treepath = evt.getPath();
        Object obj = treepath.getLastPathComponent();
        if (obj != null) {
            if ( GlobalOptions.isDodebug()) {
                System.out.print("mem:" + Runtime.getRuntime().totalMemory());
                System.out.println(" free:" + Runtime.getRuntime().freeMemory());
            }

            SortedTreeNode treenode = (SortedTreeNode) obj;
            if ( treenode.getRoot() == treenode) {
                if (current_panel != null) {
                    displayPanel.removeAll();
                    current_panel=null;
                }
                displayPanel.repaint();
            }
            Object obj1 = treenode.getUserObject();
            if (obj1 instanceof TreeNodeInfo) {
                TreeNodeInfo tmpnode = (TreeNodeInfo) obj1;
                Graph nodeobj = tmpnode.getNode_object();
                if (current_panel != null) {
                    displayPanel.removeAll();
                    current_panel=null;
                }
                mygraphview.setGraph(nodeobj);
                current_panel = mygraphview;
                displayPanel.add(mygraphview);
                displayPanel.validate();
                displayPanel.repaint();

            }
            if (obj1 instanceof ParentNodeInfo) {
                ParentNodeInfo tmpnode = (ParentNodeInfo) obj1;
                List nodeobj = tmpnode.getNode_object();
                if (current_panel != null) {
                    displayPanel.removeAll();
                    current_panel=null;
                }
                current_panel = nodeobj.run();
                displayPanel.add(current_panel);
                displayPanel.validate();
                displayPanel.repaint();
            }
        }

    }//GEN-LAST:event_jTree1ValueChanged