JComponent () { mySplitter = new JBSplitter(!MarkdownApplicationSettings.getInstance().getMarkdownPreviewSettings().isVerticalSplit(), 0.5f, 0.15f, 0.85f); mySplitter.setSplitterProportionKey(MY_PROPORTION_KEY); mySplitter.setFirstComponent(myMainEditor.getComponent()); mySplitter.setSecondComponent(mySecondEditor.getComponent()); mySplitter.setDividerWidth(3); myToolbarWrapper = createMarkdownToolbarWrapper(mySplitter); final JPanel result = new JPanel(new BorderLayout()); result.add(myToolbarWrapper, BorderLayout.NORTH); result.add(mySplitter, BorderLayout.CENTER); adjustEditorsVisibility(); return result; }