6667686970717273747576
// Set the icon for leaf nodes. tree.setCellRenderer(new YCellRenderer()); // Listen for when the selection changes. tree.addTreeSelectionListener(l); // expand it // expandAll(tree, true); // Create the scroll pane and add the tree to it.