@Override
	protected void okCallback() {

		String newName = fieldName.getText().trim();

		if (newName.equals(getCurrentFieldName())) {
			close();
			return;
		}

		boolean success = false;
		int txId = program.startTransaction("Edit Field Name");
		try {
			dtComp.setFieldName(newName);
			DataType parent = dtComp.getParent();
			if (parent != null) {
				long timeNow = System.currentTimeMillis();
				parent.setLastChangeTime(timeNow);
			}
			success = true;
		}
		catch (DuplicateNameException e) {
			setStatusText(e.getMessage());
		}
		finally {
			program.endTransaction(txId, true);
		}

		if (success) {
			dtComp = null;
			program = null;
			close();
		}
	}
This method gets called when the user clicks on the OK Button.  The base
class calls this method.
Ghidra/Features/Base/src/main/java/ghidra/app/util/EditFieldNameDialog.java