I read many topics about this but still have some problems. I'm using java desktop project from NB. I have created tree from palette and now after every click of button I want to create new tree and refresh it. So I have event action performed where I want make new jTree add some DefaultMutableTreeNode's and show this in window. Any ideas?
Maybe in other words how should I create Jtree to modify it content? I make something like this now: in initComponents jTree1 = new JTree(nodeF); where nodeF is my field (DefaultMutableTreeNode) initialised before initComponents and then I want to modify this node element adding and removing another nodes.
I'm able to refresh tree ((DefaultTreeModel) jTree1.getModel()).reload(); but I'm unable to create new instance of nodeF
I fell like I'm making some stupid mistake.. dont know how to create gui right..