void () { TreeModel model = myTree.getModel(); if (model instanceof Disposable) { Disposer.dispose((Disposable)model); } myTree.setModel(null); AsyncTreeModel asyncTreeModel = new AsyncTreeModel(myTreeModel, ServiceTreeView.this); myTree.setModel(asyncTreeModel); }