Prevent node selection on node expansion in a JTree
问题 I have created a JTree with some of its nodes being custom to show them as expandable although they don't have any children (yet). I have followed this thread to implement that. Why? I want do load the tree dynamically so when the tree gets expanded, I retrieve further information from the server and show it on the tree. The problem I am experiencing is that when I expand one of these nodes, it becomes selected, which is not the default behavior for the default nodes (you can expand them