void (Container parent) { int bottomHeight = 0; JComponent jParent = (JComponent)parent; JComponent bottom = (JComponent)jParent.getClientProperty(LightToolWindow.RIGHT_MIN_KEY); if (bottom != null) { bottomHeight = LightToolWindow.MINIMIZE_WIDTH; } int width = parent.getWidth(); int height = parent.getHeight() - bottomHeight; 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); if (bottom != null) { bottom.setBounds(0, height, width, bottomHeight); } }