Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages
Started by Magnus
Thu, 28 Jul 2005 14:59
Collapse a JTree
Author: Magnus
Date: Thu, 28 Jul 2005 14:59
Date: Thu, 28 Jul 2005 14:59
26 lines
1605 bytes
1605 bytes
Hi,
I have a problem to "clear my tree".
Typical tree (visible as is):
top --- node1 --- leaf1
| |- leaf2
|
|-- node2 --- leaf3
|- leaf4
User has node1 selected and click a RadioButton.
Now I want to collapse the tree so that top and node1 and node2 are visible.
I have tried with:
TreePath top = tree.getPathForRow(1);
tree.fireTreeCollapsed(top);
tree.setSelectionRow(0);
Problem is that leaf3 & 4 are still visible
If I try with row=0 only top is visible. I then tried to expand on row=1
but nothing happened.
Any hints?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads