开发者

How to detect and display desired message when clicked on DefaultMutableTreeNode in java?

开发者 https://www.devze.com 2023-01-31 13:36 出处:网络
I am tryin to make a software in which when clicked on the subnode of a jtree, detecting which node is sel开发者_StackOverflow社区ected, want to display respective message.You will need to add a TreeS

I am tryin to make a software in which when clicked on the subnode of a jtree, detecting which node is sel开发者_StackOverflow社区ected, want to display respective message.


You will need to add a TreeSelectionListener to the model containing your nodes. The event arguments contain data for the node(s) selected. Here is some example documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消