Re: How to lock a tree node so that it won't ever collapse
- From: "Mark Holland" <kenshin_40@xxxxxxxxxxx>
- Date: Mon, 26 Mar 2007 19:50:40 +0100
I have a DefaultMutableTreeNode that sometimes collapses on certain
hardware (like a trackball) when the mouse hovers over a child node
in
my JTree.
How can I lock this one single node from collapsing? It's a root
node
that's hidden so that all the second level child nodes appear,
making
them look like multiple root nodes.
You could attach a listener to your tree, and prevent any collapse
events for the root node.
The following link has a good example on how to use this feature.
http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html
Mark
.
- References:
- How to lock a tree node so that it won't ever collapse
- From: William Z.
- How to lock a tree node so that it won't ever collapse
- Prev by Date: How to lock a tree node so that it won't ever collapse
- Next by Date: Best GUI designer (preferable for Eclipse)
- Previous by thread: How to lock a tree node so that it won't ever collapse
- Next by thread: Best GUI designer (preferable for Eclipse)
- Index(es):
Relevant Pages
|
|