DefaultTreeModel model = new DefaultTreeModel(root);
this.indexTree = new JTree(model);
this.indexTree.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 2));
// Only one node can be selected at any one time.
this.indexTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
this.indexTree.addTreeSelectionListener(new IndexTreeSelectionListener(this));
// No icons.
DefaultTreeCellRenderer cellRenderer = new DefaultTreeCellRenderer();
cellRenderer.setLeafIcon(null);
// cellRenderer.setIcon(null);
cellRenderer.setClosedIcon(null);