When I insert child nodes into root node, the root node is not automatically expanded.
I want to expand root node automatically after insert child nodes into root node.
Thanks in advance..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No default automatics, you have to implement it yourself. Several possibilities, all involving a custom TreeModelListener registered to the tree’s model. The listener acts on receiving a treeNodesInserted
Code snippet: