private int getParentedComponentWidth(Component component) {
		// preferred size is unreliable when unparented if the scaling factor has been changed,
		// so temporarily parent it while computing its preferred size (if not already parented)

		if (component == null) {
			return 0;
		}

		if (component.getParent() != null) {
			return component.getPreferredSize().width;
		}

		add(component);
		int width = component.getPreferredSize().width;
		remove(component);
		return width;
	}
Returns the value of the tab that generated the given mouse event. If the mouse event
is not from one of the tabs, then null is returned.
@param event the MouseEvent to get a value for
@return the value of the tab that generated the mouse event
Ghidra/Framework/Docking/src/main/java/docking/widgets/tab/GTabPanel.java