public static Image createRenderedImage(Component c) {

		if (!Swing.isSwingThread()) {
			yieldToSwing();
		}

		Image i = runSwing(() -> {
			try {
				return doCreateRenderedImage(c);
			}
			catch (Exception e) {
				throw new RuntimeException(e);
			}
		});
		return i;
	}
Creates a png of the given component <b>by capturing a screenshot of the image</b>.  This
differs from creating the image by rendering it via a {@link Graphics} object.

@param c the component
@return the new image
@throws AWTException if there is a problem creating the image
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java