jtree Questions

1

Solved

I want to use a custom TreeCellRenderer containing three text fields only when a node is SELECTED, while use the default renderer when the node is NOT SELECTED. The problem is that although I've se...
Michalmichalak asked 11/3, 2014 at 16:15

3

Solved

I have a JTree with DefaultTreeModel. I need to get to each node of it. Imagine I have this tree: [A] |-[B] |-[C] |-[D] | |-[E] | |-[F] | |-[G] | |-[H] |-[I] |-[J] |-[K] I need to tr...
Phonetist asked 15/1, 2014 at 3:12

1

Solved

I am somewhat lost at this point: I try to create a JTable that is able to hold some kind of a Tree (JTree?) datastructure in the first column followed by data based on the tree Node in the other c...
Lavone asked 20/11, 2013 at 12:54

1

I have an application which contains a JTree backed with a DefaultTreeModel that is used to display a hierarchy of files which reflects a section of the file system on my server (I will refer to th...
Disingenuous asked 22/2, 2013 at 3:48

2

Solved

Looking for how to traverse a JTree (can do that) and check to see each node to see if it's displayed (to the user) or not visible. Can't believe JTree doesn't have this function, maybe I'm missing...
Avram asked 12/5, 2010 at 20:54

2

Solved

I have a JTree that implements multi selection logic. This works great when I do all my selections using the mouse + Ctrl key pressed. If user makes selections with the Ctrl key unpressed it break...
Downpipe asked 31/3, 2009 at 8:24

1

Solved

I've written a custom TreeCellRenderer in order to change a components appearance. Everything works fine, except that setBackground has no effect. The code is definitely executed as the foreground ...
Adverse asked 11/5, 2013 at 18:28

3

Solved

I've been trying to get my head around this so maybe some of you can help me. I have a list of files with their full paths (these are just strings the files are on another machine), e.g: C:\a\b\c\...
Apriorism asked 12/2, 2013 at 11:50

2

Solved

In my project, I am trying to add a file explorer so the user can select files from a given directory. I want to limit this view to the project's root folder (which is determined by the user). This...
Coulson asked 1/3, 2013 at 2:40

2

Solved

I have implemented a tree using Lazy Loading. The 1st level nodes are created at the time of tree creation, where as the child nodes are created only when a user expands any particular node. The da...
Radiogram asked 25/2, 2013 at 20:2

2

Solved

Please have a look at the SSCCE. How can I make the non-selected tree nodes' background transparent. At the moment the background of non-selected nodes is white. My cell renderer, however, should p...
Bombsight asked 28/1, 2013 at 13:47

4

Solved

I have a Java SE 7 application that needs to have the JTree nodes updated. From the tutorial given by Oracle using this thread, there's no given hint on how I could update the label (displayed text...
Ascender asked 3/9, 2012 at 14:27

1

Possible Duplicate: JTree: how to get the text of selected item? 1In C# there's TreeView_afterSelect event, and i ask if in java is something like that ? I used : hierarchyPropertyCha...
Schistosome asked 17/1, 2013 at 19:34

1

I have been working to transition a Java application from WindowsLookAndFeel to Nimbus, largely successfully, despite Nimbus foibles. My users overall like the Nimbus LaF but didn't like some detai...
Jarrod asked 26/4, 2012 at 19:28

7

I have a data object represented in a TreeModel, and I'd like to show only part of it in my JTree--for the sake of argument, say the leaves and their parents. How can I hide/filter the unnecessary ...
Grubman asked 6/5, 2009 at 21:18

3

Solved

Often when using JTable or JTree, user define its own cell renderer. It is very common to inherit user's component from DefaultTableCellRenderer, and implements the renderer method getTableCellRend...
Colonist asked 2/12, 2012 at 19:36

2

Solved

I want to make text editor with file browser so when I start my application I want to my program add nodes on JTree so it shows me all files and folders for example in My Documents folder, and to g...
Fogle asked 6/11, 2012 at 19:39

1

I want to build JTree which has nodes that contain check box + icon + data and tree selection algorithm.
Upland asked 13/10, 2012 at 7:16

4

Solved

I need to add checkboxes to a JTree. A custom TreeCellRenderer/TreeCellEditor seems like the right approach. So far I used the CheckBoxNodeRenderer approach in this webpage. It works OK except for ...
Dominicdominica asked 3/8, 2009 at 16:6

4

Solved

Not sure if this is the right spot to ask but I'm having a Java issue. I have some Java code that works in Java 6 but not in Java 7, the error is: java.lang.IllegalStateException: This function sh...
Phalanstery asked 10/10, 2012 at 13:54

2

Solved

I have a JTree with a custom TreeModel and a custom TreeRenderer. The Tree Model contains a bunch of objects of different types. One of these types is displayed differently than the others: The di...
Breskin asked 28/9, 2012 at 15:17

1

Solved

I have JScrollPane which contains only one instance of JTree. How can I set margin around JTree inside of JScrollPane? I have such a code tree.setPreferredSize(new Dimension(200, 200)); JScrollP...
Vang asked 7/8, 2012 at 8:9

2

Solved

I am using a JPanel with some JLabels and JTextFields as editor and renderer in a JTree. The user can click on any JTextField and modify the text. All works fine. All I am missing is how I can dy...
Mission asked 2/8, 2012 at 15:10

2

Solved

I want to get all child nodes of root node. ex: Root child1 child1.child1 child2 child2.child1 Now I want to get the two child nodes called "child1" and "child2". How to do that? Is there ...
Horsewhip asked 13/7, 2012 at 12:32

5

Solved

With a JTree, assuming the root node is level 0 and there may be up to 5 levels below the root, how can I easily expand all the level 1 nodes so that all level 1 & 2 branches and leafs are visi...
Handkerchief asked 4/2, 2009 at 9:10

© 2022 - 2024 — McMap. All rights reserved.