debugger/swing_utils/src/main/com/thesett/aima/logic/fol/wam/debugger/swing/FillViewportLayout.java
public void layoutContainer(Container parent)
    {
        JViewport vp = (JViewport) parent;
        Component view = vp.getView();

        if (view == null)
        {
            return;
        }

        Point viewPosition = vp.getViewPosition();
        Dimension viewPrefSize = view.getPreferredSize();
        Dimension vpSize = vp.getSize();
        Dimension viewSize = new Dimension(viewPrefSize);

        if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width))
        {
            viewSize.width = vpSize.width;
        }

        if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height))
        {
            viewSize.height = vpSize.height;
        }

        if (!viewSize.equals(viewPrefSize))
        {
            vp.setViewSize(viewSize);
        }
    }
public void layoutContainer(Container parent)
    {
        JViewport vp = (JViewport) parent;
        Component view = vp.getView();

        if (view == null)
        {
            return;
        }

        Point viewPosition = vp.getViewPosition();
        Dimension viewPrefSize = view.getPreferredSize();
        Dimension vpSize = vp.getSize();
        Dimension viewSize = new Dimension(viewPrefSize);

        if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width))
        {
            viewSize.width = vpSize.width;
        }

        if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height))
        {
            viewSize.height = vpSize.height;
        }

        if (!viewSize.equals(viewPrefSize))
        {
            vp.setViewSize(viewSize);
        }
    }
{@inheritDoc}