I need to get some ideas from the experts. I have a JTree with three nodes; every time a node is selected, it has to execute some task. For instance, if node A is selected, action A is invoked. If node B is selected, action B is called. You get the idea. I am wondering is there any design
pattern that I can use to implement this scenario. I don't want to have a bunch of 'if' statements for checking the node to determine what action needs to call.
If any one knows of anything that can help me, pls. let me know.
Thanks in advance!