protected AbstractButton findButton(Container container, String text) {
		Component[] comp = container.getComponents();
		if (!container.isShowing()) {
			// this component uses hidden panels via a CardLayout--ignore hidden panels, 
			// as they are for different conflicts
			return null;
		}

		for (Component element : comp) {
			if ((element instanceof AbstractButton && element.isShowing()) &&
				((AbstractButton) element).getText().indexOf(text) >= 0) {
				return (AbstractButton) element;
			}
			else if ((element instanceof Container) && element.isShowing()) {
				AbstractButton b = findButton((Container) element, text);
				if (b != null) {
					return b;
				}
			}
		}
		return null;
	}
Adapter for data type merge tests.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/AbstractDataTypeMergeTest.java