External Tree Node Selection
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jim_Davee
Posted On:   Thursday, March 22, 2001 01:27 PM

New to Java and OO programming, so I'm quite confused. I have an app using a Jtree to show hierarchial data. A separate Jtable shows the same hierarchy in the first column but includes additional data on each table row. The tree is to assist in visualizing the organization of the source data. I've connected the tree to the table such that navigating the tree also navigates the table. I'm trying to do the same for table to tree but I'm stuck, probably on something very stupid. The setSelectedPath() method required a tree path, and references are made to the tree path being an Object[] that lists all nodes from root to selection. I'm attempting to get this full path by navigating a preordered enumeration (remembe   More>>

New to Java and OO programming, so I'm quite confused.

I have an app using a Jtree to show hierarchial data. A separate Jtable shows the same hierarchy in the first column but includes additional data on each table row. The tree is to assist in visualizing the organization of the source data.

I've connected the tree to the table such that navigating the tree also navigates the table. I'm trying to do the same for table to tree but I'm stuck, probably on something very stupid.

The setSelectedPath() method required a tree path, and references are made to the tree path being an Object[] that lists all nodes from root to selection.

I'm attempting to get this full path by navigating a preordered enumeration (remember that the table matches the tree, so table row 4 equals enumeration 4), but all I'm receiving is the single node, not the full path.

What am I doing wrong here?

Thanks,
Jim

   <<Less

Re: External Tree Node Selection

Posted By:   Sandip_Chitale  
Posted On:   Wednesday, March 28, 2001 11:45 PM

This is what you want -


http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html

About | Sitemap | Contact