JComponent () { if (myPanel != null) return myPanel; JBSplitter splitter = new JBSplitter("StubViewer.showPreviewDetails.proportion", 0.7f); splitter.setFirstComponent(ScrollPaneFactory.createScrollPane(myStubTree, true)); AnAction action = myStubDetailsViewer.addComponent(splitter); ActionToolbarImpl toolbar = new ActionToolbarImpl("Stub Viewer", new DefaultActionGroup(action), false); toolbar.setTargetComponent(splitter); BorderLayoutPanel panel = new BorderLayoutPanel(); panel.addToCenter(splitter).addToRight(toolbar).setBorder(IdeBorderFactory.createBorder()); initTree(myStubTree); myPanel = panel; return panel; }