public void GetElementsOnProject(Project project){
         try{
            
                     SetOfElements projectElements = new SetOfElements();
                     ResultSet projectResults = null;
                     Statement statement;
                     statement = connection.createStatement();
                     projectResults = statement.executeQuery( "SELECT * FROM SetOfElements WHERE projectID =" + project.getProjectID() + ";");                     
                     
                     while (projectResults.next())
                    {
                        for(int i=0; i<allElements.size();i++){
                            if(allElements.get(i).getElementID()==projectResults.getInt("elementID")){
                                projectElements.addElement(allElements.get(i));
                            }
                        }
                    }
          }catch(Exception e){
            JOptionPane.showMessageDialog(null,e);
        }
         
         
     }