TreeView - Jtree (NetBeans) How to add a description to a selected node

2

I'm doing a simple treeview on NetBeans and would like to know how to add a description to a particular selected node, through a button that has a function that will associate with a lable.

The code for the "> >" button which will insert the description looks like this:

private void add2ActionPerformed(java.awt.event.ActionEvent evt) {                                     
   lTree2.setText(tf2.getText());
} 

Obviously it does not do what I want, I just put it to illustrate what I want to know.

    
asked by anonymous 19.06.2015 / 21:33

0 answers