@Override
    public Component getListCellRendererComponent(
            JList list,
            Object value,
            int index,
            boolean selected,
            boolean expanded) {       
        
        
        String text=value.toString();
        
        label.setText(text.substring(1));
        
        ImageIcon icon;
        
        if(text.startsWith("1")){
            icon=new ImageIcon(getClass().getResource("Imagenes/dir.png"));
        }else{
            icon=new ImageIcon(getClass().getResource("Imagenes/file.png"));
        }
        
        label.setIcon(icon);

        if (selected) {
            label.setBackground(backgroundSelectionColor);
            label.setForeground(textSelectionColor);
        } else {
            label.setBackground(backgroundNonSelectionColor);
            label.setForeground(textNonSelectionColor);
        }

        return label;
    }