private void createNewAccountButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createNewAccountButtonActionPerformed
        
        String userName = userNameTextField.getText();
        String password = String.valueOf(jPasswordField1.getPassword());
        String password2 = String.valueOf(jPasswordField2.getPassword());
        String email = emailAddressTextField.getText();
        String error="";
        if (UserAccount.userExists(userName)) {
            System.out.println("Invalid Login");
            JOptionPane.showMessageDialog(this, "User already exists.",
                    "Error", JOptionPane.INFORMATION_MESSAGE);
        } else {
            if (ua.isValidUsername(userName) && ua.isValidPassword(password)
                    && ua.isValidEmail(email) && ua.passwordMatch(password, password2)) {
                UserAccount newAccount = new UserAccount(userName, password, email);
                VampPlayerGUI player = new VampPlayerGUI();
                player.newUser(newAccount);
                this.setVisible(false);
            } else {
                if (ua.isValidUsername(userName) == false) {
                    error += "- Username must be 3-16 alphanumeric characters and start with a letter /n";
                }else{
                    error += "- Username IS VALID /n";
                }
                if (ua.isValidPassword(password) == false) {
                    error += "- Password be 6-16 characters and must contain at least: a number, a lowercase, an uppercase /n";
                }else{
                    error += "- Password IS VALID /n";
                }
                if (ua.isValidEmail(email) == false) {
                    error += "- Email must be in user@host.me format /n";
                }else{
                    error += "- Email IS VALID /n";
                }
                if (ua.passwordMatch(password, password2)) {
                    error += "- Passwords MATCH /n";
                }else{
                    error += "- Passwords do not match. /n";
                }
                System.out.println("Invalid Login");
                JOptionPane.showMessageDialog(this, error.split("/n"),
                        "Error", JOptionPane.INFORMATION_MESSAGE);
            }
        }
    
    }//GEN-LAST:event_createNewAccountButtonActionPerformed