public void btnPressedUserForm(ActionEvent e)
			throws NoSuchAlgorithmException {

		if (validateEmpty(new JTextField[] { userForm.txtOldPassword })) {
			return;
		}
		if (e.getSource() == userForm.btnChangePw) {
			User user = new User();
			String newPasswd = String.valueOf(userForm.txtPassword
					.getPassword());
			String newPasswd2 = String.valueOf(userForm.txtPassword2
					.getPassword());
			String oldPasswd = String.valueOf(userForm.txtOldPassword
					.getPassword());

			if (newPasswd.equals(newPasswd2)) {
				user.setRole(userForm.cmbUserRole.getSelectedItem().toString());

				if (checkOldPasswd(user, oldPasswd)) {
					BigInteger encryptedPasswd = null;
					encryptedPasswd = encryptPassword(newPasswd);
					user.setPassword(encryptedPasswd);
					dao.modify(user);
				} else {
					JOptionPane.showMessageDialog(userForm,
							"The current password is incorrect!",
							"Password Incorrect", JOptionPane.ERROR_MESSAGE);
				}
			} else {
				JOptionPane.showMessageDialog(userForm,
						"Your new password entries did not match!",
						"New Password Entries Did Not Match",
						JOptionPane.ERROR_MESSAGE);
			}
		}
	}