public void setTitleComponent(JComponent component) {
		JComponent existing = getTitleComponent();

		int existingIndex = -1;

		if (existing != null) {
			existingIndex = getComponentIndex(existing);
			if (existingIndex != -1) {
				super.remove(existingIndex);
			}
		}

		border.setTitleComponent(component);
		super.add(component, BorderLayout.CENTER, existingIndex);
	}
Create a panel with <code>titleComponent</code> in the prescribed location with a secondary
 border
@param titleComponent widget to draw in the border
@param titleJustification top-bottom alignment
@param titlePosition left-right alignment
@param otherBorder secondary border to place around this panel
@see TitledBorder
Ghidra/Framework/Docking/src/main/java/docking/widgets/InlineComponentTitledPanel.java