Most voted "jtree" questions
Jtree is the component belonging to the javax.swing package that represents a hierarchical data tree. A Jtree object does not contain the data, it only provides visualization of the data. Like any non-trivial Swing component, the tree gets data from its data model. Use this tag only for questions related to this component.
Learn more…11 questions
Sort by count of
-
6
votes0
answers320
viewsAdd checkbox to a Jtree
I’ve looked around for plenty of examples JTreeIt’s checkboxes but it all seems very complex. Does anyone know a simple way, if there is one, to add to a JTree that I dragged to my frame, a checkbox…
-
5
votes2
answers639
viewsHow to get all paths of a Jtree?
How can I get all the paths of a JTree including the nodes which have parents other than root? root exemplo1 exemplo1.1 exemplo2 exemplo2.1 If I do something like that: for(int i = 0; i<…
-
3
votes1
answer58
viewsJtree: Why does she lose focus when I edit a knot?
I am developing a PJC (Oracle Forms) component. I’m making a bean with a jtree inside it. In a standard java application, it works well, but in PJC there is a strange behavior with the focus. When I…
-
2
votes0
answers155
viewsTreeview - Jtree (Netbeans) Adding a description to a selected node
I am doing a simple treeview in Netbeans and would like to know how to add a description to a selected node by means of a button that has a function that will associate to a lable. the code for the…
-
2
votes0
answers71
viewsDrag & Drop in Jtree
I need to implement a Drag & Drop in one Jtree of 3 levels so that by clicking on one node of the tree and dragging it to another, some operations are performed. The scheme is basically:…
-
1
votes1
answer119
viewsReturn names of selected items from a checkboxTree
How can I check which items are selected from a checkboxTree ? I have already searched and I know that this code returns the last selected: DefaultMutableTreeNode node = (DefaultMutableTreeNode)…
-
1
votes1
answer61
viewsfireTableDataChanged in Abstracttreetablemodel Swingx package
I’m having doubts about how to make a Reload on the objects of a JXTreeTable using a Model > AbstractTreeTableModel. The AbstractTableModel of a JTable normal has the fireTableDataChanged, but…
-
1
votes1
answer41
viewsJtree does not update when starting GUI
I’m having a problem that I’m not being able to visualize the solution: Simply put, my Java program has a swing GUI that contains a Jtree (Treemodel customized for system directory view ) There is a…
-
0
votes0
answers257
viewsPrint selected nodes of a Jtree
I got this Jtree: I have this code that returns to me all the nodes of JTree: public void print() { recurse((TreeNode) jTree2.getModel().getRoot()); } public void recurse(TreeNode theNode) {…
-
0
votes0
answers68
viewsAccess to the checkbox of each Ode from a Jtree
How can I access the checkbox of each Ode of a JTree? TreePath[] checkedPaths = checkTreeManager.getSelectionModel().getSelectionPaths(); The previous code returns me all the selected paths. When I…
-
0
votes1
answer336
viewsStart all Checkboxes for a selected Jtree
I wonder how I could do to start the class already with all checkboxes checked, I found this class and used: package CustonComponents; import java.awt.BorderLayout; import java.awt.Component; import…