DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();  ClassLoader classLoader = FindBugsFrame.class.getClassLoader(); java.net.URL bug2URL = classLoader.getResource("edu/umd/cs/findbugs/gui/bug2.png"); ImageIcon icon = new javax.swing.ImageIcon(bug2URL); renderer.setOpenIcon(icon); renderer.setClosedIcon(icon); renderer.setLeafIcon(icon); navigatorTree.setCellRenderer(renderer);
    private void postInitComponents() {        viewPanelLayout = (CardLayout) viewPanel.getLayout();        navigatorTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);        navigatorTree.addTreeSelectionListener(new TreeSelectionListener() {            public void valueChanged(TreeSelectionEvent e) {                navigatorTreeSelectionChanged(e);            }        });    }