问题
In this tutorial, how I get attribute of xml when I right click delete menu, then show the dialog with the value of attribute?
回答1:
In deleteAction
, you can reference clickedPath.getLastPathComponent()
to access the selected node.
来源:https://stackoverflow.com/questions/11790390/get-attribute-xml-in-jtree