简体   繁体   中英

If the user selects a row in a JTreeTable SwingX, how do I find out which node is actually selected

I am working on TreeTable in swingx library and I cant find a way how to actually get the treetable node selected on view. There is a method called getSelected, but it only gets the index from the table, I have no means to translate it into the model, plus this index depends if the node expanded or not. And in the model there are not methods to get children by the index on the table, and again the index depends if nodes are expanded or not, so I can't see no sure way to get actual selected node from the table. Did anyone have the same problem and can help??

Doesn't the method

getPathForRow(...)

give you what you need?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM