I used a JTree in my GUI and added it to a JFrame. When I want to update it and change it\'s nodes in another part of my program (while program is running, as an action performe
You need to ensure that after updating your model you instruct it to fire an event to cause any registered listeners to be notified of the event. One of the listeners will be the JTree
and upon receiving the event it will repaint.
For example, DefaultTreeModel contains the methods:
nodeChanged nodesChanged nodeStructureChanged nodesWereInserted nodesWereRemoved
Also, as with all Swing programming you need to ensure you are updating your model on the Event Dispatch Thread.