Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Row selection in JXTreeTable after teeTablemodel : fireTreeStructureChanged()  RSS feed

 
Sharath Musunoori
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem in selecting a specific row (or tree path) after the use of the method

myJXTreeTable.treeTableModel.getTreeModelSupport().fireTreeStructureChanged();

My code looks like the following....

TreePath selPath = myJXTreeTable.getTreeSelectionModel().getSelectionPath();
myJXTreeTable.getTreeTableModel().getTreeModelSupport().fireTreeStructureChanged(rootPath);
myJXTreeTable.getTreeSelectionModel().setSelectionPath(selPath);

The value of myJXTreeTable.getTreeSelectionModel().getSelectionPath() seems to be correct, though the selection in the tree table is not visible.

Any help in this regard will be appreciated.

Thank you
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!