public void showEmptyTableOverlay(boolean b) {
		BorderLayout layout = (BorderLayout) getLayout();
		if (previousCenterComponent == null) {
			previousCenterComponent = layout.getLayoutComponent(BorderLayout.CENTER);
		}
		Component currentCenterComponent = layout.getLayoutComponent(BorderLayout.CENTER);

		if (b) {
			if (currentCenterComponent != emptyTableOverlayComponent) {
				remove(previousCenterComponent);
				add(emptyTableOverlayComponent, BorderLayout.CENTER);
			}
		}
		else {
			if (currentCenterComponent != previousCenterComponent) {
				remove(emptyTableOverlayComponent);
				add(previousCenterComponent, BorderLayout.CENTER);
			}
		}

		invalidate();
		repaint();
	}
A Ghidra table panel that can show a custom overlay instead of an empty table.

@param <T> table row type
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/EncodedStringsThreadedTablePanel.java