Hi,
I do have Tree base on JTree and want to respond
to the expand (and collapse) event of the treenodes
which listener should I add to which object?
any ideas?
thx
Peter
Denis - 18 May 2006 14:15 GMT
Peter Plumber ha scritto:
> Hi,
>
> I do have Tree base on JTree and want to respond
> to the expand (and collapse) event of the treenodes
> which listener should I add to which object?
> any ideas?
Before to ask please see Java API...
JTree has a method called
addTreeExpansionListener(TreeExpansionListener tel)...
Wow!
DM
> thx
>
> Peter
Peter Plumber - 18 May 2006 16:07 GMT
> Before to ask please see Java API...
> JTree has a method called
> addTreeExpansionListener(TreeExpansionListener tel)...
> Wow!
thanks a lot
I could not find it
Peter
Thomas Fritsch - 18 May 2006 14:29 GMT
> I do have Tree base on JTree and want to respond
> to the expand (and collapse) event of the treenodes
> which listener should I add to which object?
> any ideas?
There are 2 possibilities:
(1) You want to be notified *after* a tree-node has been
collapsed or expanded:
Call yourTree.addTreeExpansionListener(TreeExpansionListener)
(2) You want to be notified *before* a tree-node will
collapse or expand:
Call yourTree.addTreeWillExpandListener(TreeWillExpandListener)

Signature
Thomas