String strRep=null; strRep=getID(); // this function returns null or a string value protected static DefaultTreeModel treeModel;// declared in class level boolean shouldBeVisible=true; if(strRep!=null) { String path=System.getProperty("user.dir"); // getRepositoryName returns a string File Cr=new File(path + "/" + getRepositoryName() ); b=Cr.mkdir(); DefaultMutableTreeNode nrep=new DefaultMutableTreeNode(getRepositoryName()); if(b) { toolkit.beep(); treeModel.insertNodeInto(nrep, rep, rep.getChildCount()); } } if(shouldBeVisible) { tree.scrollPathToVisible(new TreePath(nrep.getPath())); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)