I am trying to add child nodes to a JTree inside a SwingWorker thread. Then reload the model to update the UI. When I reload the JTree DefaultModel it throws a NullPointerException. Is there a way to fix this? or do I have to find a different approach?I am trying to add child nodes to a JTree insid