public void GetTasksOnProject(Project project){
           try{
                     SetOfTasks projectTasks = new SetOfTasks();
                     ResultSet projectResults = null;
                     Statement statement;
                     statement = connection.createStatement();
                     projectResults = statement.executeQuery( "SELECT * FROM Task WHERE projectID = " + project.getProjectID() + ";");                     
                     
                     while (projectResults.next())
                    {
                        for(int i=0; i<allTasks.size();i++){
                            if(allTasks.get(i).getTaskID()==projectResults.getInt("taskID")){
                                projectTasks.addTask(allTasks.get(i));
                            }
                        }
                    }
          }catch(Exception e){
            JOptionPane.showMessageDialog(null,e);
        }
     }