private DefaultMutableTreeNode loadModelTreeView(){

        algo = new DefaultMutableTreeNode("Algorithms");
        sort = new DefaultMutableTreeNode("Sorts");
        search = new DefaultMutableTreeNode("Search");
        ArrayList<DefaultMutableTreeNode> listSorts = new ArrayList<DefaultMutableTreeNode>();
        ArrayList<DefaultMutableTreeNode> listSearches = new ArrayList<DefaultMutableTreeNode>();
        DefaultMutableTreeNode node;

        FileDataBase fileBase = Main.getFileBase();
        int indexSort = 0, indexSearch = 0;

        /*if (dataBase != null){
            for(int i = 0; i<dataBase.getLength(); i++){
                if(dataBase.getFile(i).getAlgorythmType().equals("Sort")){

                    node = new DefaultMutableTreeNode(dataBase.getFile(i).getAlgorythmName());
                    listSorts.add(node) ;
                    sort.add(listSorts.get(indexSort));
                    indexSort++;
                }
                if(dataBase.getFile(i).getAlgorythmType().equals("Search")){
                    node = new DefaultMutableTreeNode(dataBase.getFile(i).getAlgorythmName());
                    listSearches.add(node);
                    search.add(listSearches.get(indexSearch));
                    indexSearch++;
                }
            }
        }*/
        if (fileBase != null){
            for(int i = 0; i<fileBase.getLength(); i++){
                if(fileBase.getFile(i).getAlgorythmType().equals("Sort")){

                    node = new DefaultMutableTreeNode(fileBase.getFile(i).getAlgorythmName());
                    listSorts.add(node) ;
                    sort.add(listSorts.get(indexSort));
                    indexSort++;
                }
                if(fileBase.getFile(i).getAlgorythmType().equals("Search")){
                    node = new DefaultMutableTreeNode(fileBase.getFile(i).getAlgorythmName());
                    listSearches.add(node);
                    search.add(listSearches.get(indexSearch));
                    indexSearch++;
                }
            }
        }

        algo.add(sort);
        algo.add(search);

        return algo;
    }