private void saveUserPassword() {
        String oldPasswordInput = new String(oldPassword.getPassword());
        String newPasswordInput = new String(newPassword.getPassword());
        String confirmInput = new String(confirmPw.getPassword());
        String savedPassword = new DBConnect().loginCheck(user.getEmail());
        boolean valid = true;
        if(!oldPasswordInput.equals(savedPassword)) {
            valid = false;
            oldPassword.setBackground(failureColor);
        }
        else {
            oldPassword.setBackground(standardColor);
        }    
        if(newPasswordInput.equals("")||confirmInput.equals("")||!newPasswordInput.equals(confirmInput)||newPasswordInput.length() < 6) {
            valid = false;
            newPassword.setBackground(failureColor);
            confirmPw.setBackground(failureColor);
        }
        else {
            newPassword.setBackground(standardColor);
            confirmPw.setBackground(standardColor);
        }
        if(valid) {
            user.setPassword(newPasswordInput);
            abortEditPassword();
        }
    }