public String getNewPassword ( ) { char [ ] rgchNewPassword = newPasswordField . getPassword ( ) ; char [ ] rgchConfirmPassword = confirmPasswordField . getPassword ( ) ; String strNewPassword = new String ( rgchNewPassword ) ; String strConfirmPassword = new String ( rgchConfirmPassword ) ; if ( strNewPassword != null ) if ( ! strNewPassword . equals ( strConfirmPassword ) ) return null ; return strNewPassword ; }
Compare the new and confirm password and return the new password .