@Override
	protected void okCallback() {
		setOkEnabled(false);
		setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

		MoveBlockTask task = model.makeTask();

		//@formatter:off		
		TaskBuilder.withTask(task)
			.setParent(this.getComponent())
			.launchModal()
			;
		//@formatter:on
	}
Dialog that uses a model to validate the fields for moving a block of memory.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/MoveBlockDialog.java