public void captureProviderWithScreenShot(ComponentProvider provider) {
		captureProviderWindow(provider);

		DockableComponent dockableComponent = getDockableComponent(provider);
		Rectangle bounds = dockableComponent.getBounds();

		// We now have a full capture of the window, but we only want the provider.  So, crop
		// out the provider.  To do this, we have to move the bounds of the provider from its
		// parent to that of the window.
		Point p = bounds.getLocation();
		Window window = SwingUtilities.windowForComponent(dockableComponent);
		Point newPoint = SwingUtilities.convertPoint(dockableComponent.getParent(), p, window);
		bounds.setLocation(newPoint);
		crop(bounds);
	}
Captures the provider by using a screen shot and not by painting the provider directly (as
does {@link #captureProvider(ComponentProvider)}). Use this method if you need to capture the
provider along with any popup windows.

@param provider the provider
Ghidra/Features/Base/src/main/java/help/screenshot/AbstractScreenShotGenerator.java