private void fillInProjectsList(int userID){
        try{
            ResultSet projectsResultSet = null;
            listOfUserProjects.clear();
            Statement statement;
            
            statement = connection.createStatement();
            projectsResultSet = statement.executeQuery("SELECT User.userID, Project.projectID, Project.projectName, "
                  + "Project.teamLeader, Project.clientRep, Project.priority FROM User INNER JOIN (Staff INNER JOIN (Project INNER JOIN "
                          + "StaffOnProjects ON Project.projectID = StaffOnProjects.projectID) ON Staff.staffID = StaffOnProjects.staffID)"                     
                          + " ON User.userID = Staff.staffID WHERE Project.clientRep=" + userID + ";");
 
            Project project;
            int projectID;
            String projectName;
            User teamLeader;
            User clientRep;
            int priority;
            SetOfElements elementCollection;
            SetOfQCReports reports;
            SetOfStaff setOfStaff;
            SetOfTasks projectTasks;
            

            while(projectsResultSet.next())
            {
                boolean exists = false;
                projectID = projectsResultSet.getInt("projectId");
                for (Project aProject: listOfUserProjects){ 
                        if(aProject.getProjectID() == projectID)
                            exists = true;
                    }

                    if(!exists){
                        projectName = projectsResultSet.getString("ProjectName");
                        priority = projectsResultSet.getInt("priority");
                        int clientRepId = projectsResultSet.getInt("clientRep");
                        clientRep =  getClientRep(clientRepId);
                        project = new Project(projectID,projectName,priority,clientRep);
                        listOfUserProjects.add(project);
                        listUserProjectsList.setListData(listOfUserProjects);
                        ProjectListCellRenderer renderer = new ProjectListCellRenderer(); //custom cell renderer to display property rather than useless object.toString()
                        listUserProjectsList.setCellRenderer(renderer);
                    }
            }
        }catch(SQLException err)
		{
                    System.out.println("ERROR: " + err);
			JOptionPane.showMessageDialog(null,"* Cannot connect to database! *");
			System.exit(1);
		}
    }