@Override
 public void layoutContainer(Container parent) {
   int width = parent.getWidth();
   int height = parent.getHeight();
   Component toolbar = parent.getComponent(0);
   Dimension toolbarSize = toolbar.isVisible() ? toolbar.getPreferredSize() : new Dimension();
   toolbar.setBounds(0, 0, width, toolbarSize.height);
   parent.getComponent(1).setBounds(0, toolbarSize.height, width, height - toolbarSize.height);
 }