@Override
	public void layoutContainer(Container container) {
        Component[] components = container.getComponents();
        if ( components.length == 0 ) {
            return;
        }
        
        Component component = components[0];
        if ( component == null ) {
            return; // shouldn't happen
        }
        
        component.setSize(component.getPreferredSize());
        Dimension size = component.getSize();
        Dimension containerSize = container.getSize();
        Insets insets = container.getInsets();
        containerSize.width -= insets.left + insets.right;
        containerSize.height -= insets.top + insets.bottom;
        int middleTop = (containerSize.height / 2) - (size.height / 2);
        int middleLeft = (containerSize.width / 2) - (size.width / 2);        
        middleLeft += insets.left;
        middleTop += insets.top;

        component.setBounds(middleLeft, middleTop, size.width, size.height);
	}
Puts the first child of the given component in the middle of the component, both vertically
and horizontally.
Ghidra/Framework/Gui/src/main/java/ghidra/util/layout/MiddleLayout.java