About 594,000 results
Open links in new tab
  1. How to Use Trees (The Java™ Tutorials > Creating a GUI With Swing ...

    TreeModel specifies methods for getting a particular node of the tree, getting the number of children of a particular node, determining whether a node is a leaf, notifying the model of a …

  2. JTree basic tutorial and examples - CodeJava.net

    Jul 6, 2019 · A Swing tutorial on how to create basic JTree component to display hierarchical data.

  3. TreeModel (Java Platform SE 8 ) - Oracle

    The model used by JTree. JTree and its related classes make extensive use of TreePaths for identifying nodes in the TreeModel. If a TreeModel returns the same object, as compared by …

  4. Java JTree - GeeksforGeeks

    Apr 24, 2025 · JTree is created with the specified TreeNode as its root. This allows you to define a custom structure for your tree by providing a root node explicitly. Mastering JTree allows …

  5. JTree (Java Platform SE 8 ) - Oracle

    To use JTree to display compound nodes (for example, nodes containing both a graphic icon and text), subclass TreeCellRenderer and use …

  6. Understanding the TreeModel - National University of Singapore

    For example, Swing's JTree component can be used with an object that implements the TreeModel interface. Similarly, a JTable can be used with a TableModel, and a JList can be …

  7. java - TreeModel creation - Stack Overflow

    Nov 28, 2013 · More sophisticated Swing components such as JTree, JTable, JList or JComboBox work with the concept of model. It means: the subjacent data that is being …

  8. java - How can I refresh a JTree after adding some nodes to the ...

    Dec 16, 2009 · First of all let me say that the only way i know to refresh a tree to reflect underlying changes, is to call the updateUI (), or reuse the setModel () method. Essentially, my problem is …

  9. swing - Java dynamic JTree - Stack Overflow

    Dec 30, 2009 · You need to have a custom implementation of a TreeModel and TreeNode, see bellow. Just extend LazyTreeModel and implement loadChildren ().

  10. JTree and TreeModel (Java Foundation Classes) - MIK

    The javax.swing.JTree class is a powerful Swing component for displaying tree-structured data. Like all Swing components, JTree relies on a separate model object to hold and represent the …

Refresh