List of usage examples for javax.swing JTree setShowsRootHandles
@BeanProperty(description = "Whether the node handles are to be displayed.") public void setShowsRootHandles(boolean newValue)
showsRootHandles
property, which specifies whether the node handles should be displayed. From source file:org.openmicroscopy.shoola.agents.util.SelectionWizardUI.java
/** * Initializes the specified tree//w w w . j a v a 2s . c o m * * @param tree The tree to handle. * @param user The user currently logged in. */ private void initializeTree(JTree tree, ExperimenterData user) { tree.setVisible(true); tree.setRootVisible(false); ToolTipManager.sharedInstance().registerComponent(tree); tree.setCellRenderer(new TreeCellRenderer(user.getId())); tree.setShowsRootHandles(true); TreeImageSet root = new TreeImageSet(""); tree.setModel(new DefaultTreeModel(root)); }