Click to See Complete Forum and Search --> : JTree problem


simham
July 22nd, 1999, 11:59 PM
sir!

I am trying to do developing JTree with the features when I pressed a node it should be expanded as well as it should be show the contents of that component in the viewport area.but I haven't get this please help me.

unicman
July 27th, 1999, 10:47 PM
I'm also doing R&D in this area. May be it will help u. What I am trying is...

Create a ExpansionAdapter and add it to the JTree using 'addExpansionListener'.

Now when I get 'TreeExpansionEvent', I am trying to identify the node which is expanded by the method 'TreeExpansionEvent.getPath().getLastParentComponent()'. And depending on the item expanded, I am intending to do my stuff for that item.


- UnicMan
http://members.tripod.com/unicman