public static Image createScreenImage(Component c) throws AWTException {

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

		Rectangle r = c.getBounds();
		Point p = r.getLocation();
		if (!(c instanceof Window)) {
			SwingUtilities.convertPointToScreen(p, c.getParent());
		}
		r.setLocation(p);
		Robot robot = new Robot();
		sleep(100);
		Image image = robot.createScreenCapture(r);
		sleep(100);
		return image;
	}
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