I would insert from right menu the option to select all the nodes of a tree. This functionality is implemented in standard pressing ctrl-a. How do I similura that functionality?
JTree tree = new JTree();
JPopupMenu popMenuTree = new JPopupMenu();
JMenuItem selectAll = new JMenuItem();selectAll.setText("SelectAll");
selectAll.setActionCommand("selectAll");
KeyStroke ctrlXKeyStroke = KeyStroke.getKeyStroke("control A");
selectAll.setAccelerator(ctrlXKeyStroke);
popMenuTree.add(selectAll);
thank you so much