Questions tagged as 'jtree'

2
answers

How to get all the paths of a JTree?

How can I get all the paths of a JTree including the nodes that have parents other than root? root exemplo1 exemplo1.1 exemplo2 exemplo2.1 If I do something like this: for(int i = 0; i< tree.getRowCount(); i++){...
asked by 18.12.2014 / 14:52
0
answers

Add checkbox to a JTree

I have already looked at quite a few examples out there of JTree s with checkboxes but it seems all very complex to me. Does anyone know a simple way, if any, to add a JTree that I dragged into my frame, a checkbox on each of th...
asked by 02.12.2014 / 13:20
1
answer

JTree: Why does it lose focus when I edit a node?

I'm developing a PJC (Oracle Forms) component. I'm creating a Bean with a JTree inside it. In a standard java application, it works fine, but in PJC a strange behavior occurs with the focus. When I press F2 or a long click to edit a tree node...
asked by 30.03.2015 / 14:26
0
answers

Drag & Drop on JTree

I need to implement a Drag & Drop in a% of 3 levels so that when you click on a tree node and drag it to another tree, some operations are performed. The scheme is basically: Empreiteiro | Equipe |...
asked by 31.07.2017 / 15:29
0
answers

TreeView - Jtree (NetBeans) How to add a description to a selected node

I'm doing a simple treeview on NetBeans and would like to know how to add a description to a particular selected node, through a button that has a function that will associate with a lable. The code for the "> >" button which will i...
asked by 19.06.2015 / 21:33
1
answer

JTree does not update when starting GUI

I have a problem that I can not see the solution: Simply put, my Java program has a swing GUI that contains a JTree (TreeModel custom for system directory view) There is a button to select a directory (via JFileChooser), after selecting JTree...
asked by 14.12.2015 / 16:18
1
answer

Return names of selected items from a checkboxTree

How can I check which items are selected from a checkboxTree ? I've had to search and I know this code returns the last selected: DefaultMutableTreeNode node = (DefaultMutableTreeNode) checkboxTree1.getLastSelectedPathComponent();...
asked by 04.12.2014 / 18:44
1
answer

fireTableDataChanged in AbstractTreeTableModel Swingx package

I am in doubt about how to do a reload on the objects of a JXTreeTable using a Model > AbstractTreeTableModel . AbstractTableModel of JTable normal has fireTableDataChanged , but how do I do this in...
asked by 14.09.2015 / 21:34
1
answer

Start all CheckBoxes of a selected JTree

I would like to know how I could do to start the class already with all checkboxes checked, I found this class and I used: package CustonComponents; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.MouseEvent; im...
asked by 01.07.2016 / 16:21
0
answers

Print selected nodes from a JTree

I have this JTree: IhavethiscodethatreturnsallnodesofJTree:publicvoidprint(){recurse((TreeNode)jTree2.getModel().getRoot());}publicvoidrecurse(TreeNodetheNode){System.out.println("1-- " + theNode); for (Enumeration theChildren = theNo...
asked by 12.12.2014 / 13:31