private void fillInElementsLists(int projectID){
        listOfElementsToApprove.clear();
        listOfElementsApproved.clear();
        if (projectID >=1){
            try{
                ResultSet elementsOnProjectListResultSet = null;
                Statement statement;
                statement = connection.createStatement();
                elementsOnProjectListResultSet = statement.executeQuery("SELECT Element.elementID, Element.elementName, Element.approved, SetOFElements.ProjectID FROM Element INNER JOIN SetOFElements ON Element.[elementID] = SetOFElements.[elementID] WHERE ProjectID="+ projectID +";"); 
                int elementID;
                String elementName;
                boolean approved;

                while(elementsOnProjectListResultSet.next())
                {
                    elementID = elementsOnProjectListResultSet.getInt("elementID");
                    elementName = elementsOnProjectListResultSet.getString("elementName");
                    approved = elementsOnProjectListResultSet.getBoolean("approved");
                    Element element = new Element(elementID,elementName,approved);
                    if (approved == false){
                        listOfElementsToApprove.add(element);
                        listElementsToApproveList.setListData(listOfElementsToApprove);
                    }else{
                        listOfElementsApproved.add(element);
                        listElementsAprovedList.setListData(listOfElementsApproved);
                    }
                    ProjectElementsListCellRenderer renderer = new ProjectElementsListCellRenderer(); //custom cell renderer to display property rather than useless object.toString()
                    listElementsToApproveList.setCellRenderer(renderer);
                    listElementsAprovedList.setCellRenderer(renderer);
                }
            }catch(SQLException err)
                    {
                        System.out.println("ERROR: " + err);
                        JOptionPane.showMessageDialog(null,"* Cannot connect to database! *");
                        System.exit(1);
                    }
        }else{
            listOfElementsToApprove.clear();
            listElementsToApproveList.setListData(listOfElementsToApprove);
            listElementsToApproveList.repaint();
            
            listOfElementsApproved.clear();
            listElementsAprovedList.setListData(listOfElementsApproved);
            listElementsAprovedList.repaint();
        }
        if (listOfElementsToApprove.isEmpty())
            btnApprove.setEnabled(false);
        else
            btnApprove.setEnabled(true);
    }