private AbstractButton findButton(Container container, String text) {

		// note: there may be some timing issue with accessing swing components from the test
		//       thread.   This waitForSwing() will cause registers to get flushed, making swing
		//       changes visible to this thread.  
		//
		//       The correct change would probably be to put this code and the similar code from 
		//       the test framework onto the swing thread when attempting to find swing widgets.
		waitForSwing();
		Component[] comp = container.getComponents();
		for (Component element : comp) {
			if ((element instanceof AbstractButton && element.isVisible()) &&
				((AbstractButton) element).getText().indexOf(text) >= 0) {
				return (AbstractButton) element;
			}
			else if ((element instanceof Container) && element.isVisible()) {
				AbstractButton b = findButton((Container) element, text);
				if (b != null) {
					return b;
				}
			}
		}
		return null;
	}
Tests for the conflict panel in the property list merge manager.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/propertylist/PropertyListMergeManager2Test.java