private void createButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createButtonActionPerformed
        //Validate input and add user if good, warn if not
        boolean errorFound = false;        //Flag if error found
        final String INVALID_EMAIL = "Email not valid.";
        final String EMAIL_REQUIRED = "Email is required.";
        final String PASSWORD_REQUIRED1 = "Password is required.";
        final String PASSWORD_REQUIRED2 = "";
        final String PASSWORD_INVALID1 = "Password must contain one letter,";
        final String PASSWORD_INVALID2 = "one number, and one special character.";
        
        
        //Force error messages invisible for multiple tries
        usernameError.setVisible(false);
        emailError.setVisible(false);
        passwordError1.setVisible(false);
        passwordError2.setVisible(false);
        
        //Username cannot be empty
        if(usernameField.getText().isEmpty()){
            usernameError.setVisible(true);
            errorFound = true;
        }
        
        //Email cannot be empty
        if(emailField.getText().isEmpty()){
            emailError.setText(EMAIL_REQUIRED);
            emailError.setVisible(true);
            errorFound = true;
        }
        //If email not empty, test for validity
        else {
            //Email must be valid - some.thing@somewhere.com
            if(!isEmailValid(emailField.getText())){
                emailError.setText(INVALID_EMAIL);
                emailError.setVisible(true);
                errorFound = true;
            }
        }
        
        //Password cannot be empty
        if(passwordField.getText().isEmpty()){
            passwordError1.setText(PASSWORD_REQUIRED1);
            passwordError1.setVisible(true);
            errorFound = true;
        }
        //If password not empty, test for validity
        else {
            //Password must contain letter, number, and special character
            if(!isPasswordValid(passwordField.getText())){
                passwordError1.setText(PASSWORD_INVALID1);
                passwordError2.setText(PASSWORD_INVALID2);
                passwordError1.setVisible(true);
                passwordError2.setVisible(true);
                errorFound = true;
            }      
        }
        
        if(errorFound==false){
            //Store user info in account
            account.setEmail(emailField.getText());
            account.setPassword(passwordField.getText());
            account.setUsername(usernameField.getText());

            //Pass to db to store user
            createUserInDB(account);
            
            JOptionPane.showMessageDialog(null, "Logged in as " + account.getUsername());
            //Close dialog
            this.dispose();
        }
        
    }//GEN-LAST:event_createButtonActionPerformed