protected TaskDialog buildTaskDialog() {

		Component centerOverComponent = parent;
		Component currentParent = centerOverComponent;
		if (currentParent != null) {
			currentParent = WindowUtilities.windowForComponent(parent);
		}

		if (currentParent == null) {
			centerOverComponent = null;
		}

		// we pass in our 'finished' latch here to avoid relying on a Swing.runLater() callback
		// (see taskFinished())
		TaskDialog dialog = new TaskDialog(centerOverComponent, task, finished);
		dialog.setMinimumSize(dialogWidth, 0);
		dialog.setStatusJustification(task.getStatusTextAlignment());
		return dialog;
	}
Helper class to launch the given task in a background thread, showing a task dialog if
this task takes to long. See {@link TaskLauncher}.
Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskRunner.java