public DirectoryTreePanel() {

        initDirectoryTree();
        
        
        /*stop processing the tree if running in applet mode*/
        //if(appletCheck())
        //    return;
        
        initComponents();
        jList1.validate();
        
        
  

        
       
        
        /*expand the tree to current working directory*/
        String curDir = System.getProperty("user.dir");
        if((new File(RNALIB + File.separator + "ct")).exists())
            curDir = curDir + File.separator + RNALIB + File.separator + "ct" + dir_escape;
        /*create path list*/
        //String[] pt = this.create_path_list(curDir);
        String[] pt = null;
        if(winOS){
            pt = this.create_path_list(curDir);
            pt[0] = pt[0] + "\\";
        }
        else{
            pt = curDir.split(File.separator);
        
        /*get machine name*/
        try {
            hostname = InetAddress.getLocalHost().getHostName();
        } catch (UnknownHostException ex) {
            Logger.getLogger(FileTreeModel.class.getName()).log(Level.SEVERE, null, ex);
        }
        pt[0] = hostname;
        }
        
        Object root = model.getRoot();
        /*build tree path*/
        Object parent = root;
        
        
        jTree1.setSelectionRow(1);
        TreePath tp = jTree1.getSelectionPath();
        tp = tp.getParentPath();
        TreePath curPath = null;
         
        int i = winOS ? 0:1;
        for(;i<pt.length;i++){
            
            /*locate the right child*/
            Object child = null;
            int n = model.getChildCount(parent);
            int j=0;
            for(j=0;j<n;j++){
                child = model.getChild(parent, j);
                if(child.toString().equals(pt[i]))                  
                    break;
            }
            /*descend over it */     
            curPath = tp.pathByAddingChild(child);
            tp = curPath;
            parent = child;
            jTree1.fireTreeExpanded(tp);
            jTree1.setSelectionPath(tp);
        }
        
       jTree1.scrollPathToVisible(tp);
       this.loadDirectoryFiles();
        
    }