private void confirm_buttonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_confirm_buttonActionPerformed
	String curr  = new String(curr_pass_field.getPassword());
	String newP  = new String(new_pass_field.getPassword());
	String newP2 = new String(new_pass_field2.getPassword());

        if (! curr.equals(a.getPassword())) {
	    JOptionPane.showMessageDialog(this, "Current password given isn't correct.");
	} else if (! newP.equals(newP2)) {
	    JOptionPane.showMessageDialog(this, "The two new passwords given do not match.");
	} else if (newP.isEmpty() || newP2.isEmpty()) {
	    JOptionPane.showMessageDialog(this, "Empty passwords are not allowed.");
	} else {
	    int choice = JOptionPane.showConfirmDialog(this, "Really reset password?");

	    if (choice == JOptionPane.OK_OPTION) {
		a.setPassword(newP);
		AccountAccess.modifyAccount(a.getUsername(), a);

		System.out.println("Password changed to " + newP);
	    }
	}
    }//GEN-LAST:event_confirm_buttonActionPerformed