private void jTree1ValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_jTree1ValueChanged
        // TODO add your handling code here:
          projectsCbo.removeAllItems();
          elementsCbo.removeAllItems();    
          assetCbo.removeAllItems();
        DefaultMutableTreeNode pnode2 = new DefaultMutableTreeNode();
          
         DefaultMutableTreeNode node = (DefaultMutableTreeNode) jTree1.getLastSelectedPathComponent();
         if (node != null ){
             if (node.getUserObject() instanceof Project ){
             }else{
            
         DefaultMutableTreeNode pnode = (DefaultMutableTreeNode) node.getParent();
         
         if (node.getUserObject() instanceof Element ){
         }else{
             pnode2 = (DefaultMutableTreeNode) pnode.getParent();
         }
         
                        
        
         if (node.getUserObject() instanceof Asset) {
            projectsCbo.setEnabled(false);
            elementsCbo.setEnabled(true);          
            assetCbo.setEnabled(false); 
            //load all elements for project
           Project project = (Project) pnode2.getUserObject();           
           fillInElementsOnProjectList(project.getProjectID());
            //fillInElementsOnProjectList();
            }
     
        if (node.getUserObject() instanceof Task) {
            projectsCbo.setEnabled(false);
            elementsCbo.setEnabled(false);          
            assetCbo.setEnabled(true); 
                        
             Element element = (Element) pnode2.getUserObject();
            fillInAssetOnElementsList(element.getElementID());
             //task = (Task) node.getParent().getUserObject();
           }
          
        if (node.getUserObject() instanceof Element) {
            projectsCbo.setEnabled(true);
            elementsCbo.setEnabled(false);          
            assetCbo.setEnabled(false);           
            
            for (int i = 0; i< (AllProjects.size()); i++)
          {
              projectsCbo.addItem(AllProjects.get(i));
          }           
           }
        
          UserListCellRenderer renderer = new UserListCellRenderer();
          projectsCbo.setRenderer(renderer);
          assetCbo.setRenderer(renderer);
          elementsCbo.setRenderer(renderer);
         }
                 }
    }//GEN-LAST:event_jTree1ValueChanged