posted 10 years ago
Hello!
I want to do lazy loading of tree nodes from database. I have to use TreeWillExpandListener for that.
The issue is that TreeWillExpandListener does not handle event when I try to expand node with no children.
In TreeWillExpandListener I want to go to database, get all data and then add children to node which to be expanded.
If I add dummy DefaultMutableTreeNode to node then TreeWillExpandListener works,
but I want to know if there is better way to fire TreeExpansionEvent when user tries to expand node with no children yet.
Thank you!
To earn money on java go to upwork.com