我有两个类,一个是java tree, 一个是窗口界面,由java tree上的节点右键打开了这个窗口,在窗口中填完了参数,得到结果再保存完后需要更新java tree, 请问这个过程怎么实现,给出我的代码,大家帮我想想办法
//这段代码是java tree上的,potentialPrediction 是一个节点的action打开了名为ProductPredictionTopComponent的窗口.再窗口中完成保存这个动作后需要在java tree里添加一个节点   private Action PotentialPredictionAction = new AbstractAction () {
      public void actionPerformed (ActionEvent e) {
         //   _pppanel =(ProductPredictionTopComponent) WindowManager.
         //       getDefault ().findTopComponent ("ProductPredictionTopComponent");
         View3DManager v3dm = View3DManager.getInstance (WellAttribute);
         DesignHWell  _dhw = v3dm.getDesignHWell (WellAttribute[0]);
         // 打开窗口
         ProductPredictionAction ppac = new ProductPredictionAction ();
         ppac.openPPPanel (_dhw,getCurrentWElement (),WellAttribute[1]);
         //当窗口中数据类型为boolean 的updateTreeNode 的方法为true的时候更新节点,就是在这里不知道怎么能够监听窗口那边的改变,请赐教
         if(ppac.updateTreeNode ()==true){
            updateppNode(ppac.getFormulaName ());
         }
      }
   };