JComponent () { Splitter splitter = new Splitter(false, (float)0.6); JPanel result = new JPanel(new BorderLayout()); if (myTree == null) { myTree = createTree(); } else { final CheckedTreeNode root = (CheckedTreeNode)myTree.getModel().getRoot(); myRoot = (MemberNodeBase)root.getFirstChild(); } myTreeSelectionListener = new TreeSelectionListener() { @Override public void valueChanged(TreeSelectionEvent e) { final TreePath path = e.getPath(); if (path != null) { final MemberNodeBase<M> node = (MemberNodeBase)path.getLastPathComponent(); myAlarm.cancelAllRequests(); myAlarm.addRequest(() -> updateEditorTexts(node), 300); } } }; myTree.getSelectionModel().addTreeSelectionListener(myTreeSelectionListener); JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree); splitter.setFirstComponent(scrollPane); final JComponent callSitesViewer = createCallSitesViewer(); TreePath selectionPath = myTree.getSelectionPath(); if (selectionPath == null) { selectionPath = new TreePath(myRoot.getPath()); myTree.getSelectionModel().addSelectionPath(selectionPath); } final MemberNodeBase<M> node = (MemberNodeBase)selectionPath.getLastPathComponent(); updateEditorTexts(node); splitter.setSecondComponent(callSitesViewer); result.add(splitter); return result; }