Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1303 > unrolled thread

Re: How to lock a tree no

Started by"Mark Holland" <mark.holland@THRWHITE.remove-dii-this>
First post2011-04-27 15:32 +0000
Last post2011-04-27 15:32 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.gui

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to lock a tree no "Mark Holland" <mark.holland@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000

#1303 — Re: How to lock a tree no

From"Mark Holland" <mark.holland@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectRe: How to lock a tree no
Message-ID<eu94lo$3ml$1@news.freedom2surf.net>
  To: comp.lang.java.gui
>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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web