I need to use BeanTreeView for my project, so I practiced using this component in this guide: Tutorial
Here is the complete source code: Source code
I would like to display the properties of the selected tree item (Event) in the native "Properties" window, which this line of code should provide:
associateLookup(ExplorerUtils.createLookup(mgr, getActionMap()));
Unfortunately, the properties of the selected tree item are not displayed in "Properties" window, why?
There's another tutorial that describes what you need:
https://netbeans.apache.org/tutorial/main/tutorials/nbm-nodesapi2/#_creating_a_node_subclass
and
https://netbeans.apache.org/tutorial/main/tutorials/nbm-nodesapi2/#_properties_and_the_property_sheet
You basically have to make a few changes in the "My Editor" project.
Introduce a new class
EventNode:Change the constructor of
MyEditor:And in
EventChildFactoryalter thecreateNodeForKeymethod: