public void removeComponent(JComponent component) {

		int componentCount = mainPanel.getComponentCount();
		for (int i = 0; i < componentCount; i++) {
			if (mainPanel.getComponent(i) == component) {
				mainPanel.remove(i);
				mainPanel.remove(i);	// also remove the JSeparator the follows it
				break;
			}
		}
		for (int i = 0; i < columnModel.getColumnCount(); i++) {
			TableColumn column = columnModel.getColumn(i);
			if (((ComponentData) column.getHeaderValue()).component == component) {
				columnModel.removeColumn(column);
				break;
			}
		}
	}
Removes the given component from being managed.
@param component the component to be removed
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/InteractivePanelManager.java