这是我的信息记录代码:
private class CellEditorAction implements CellEditorListener {

  public void editingCanceled(ChangeEvent e) {
  System.out.println("==========编辑取消");
  }  public void editingStopped(ChangeEvent e) {
  System.out.println("=======编辑结束");  String teanName2 = root.getLastChild().toString();
  System.out.println("新添加的分组:" + teanName2);
    }
 }
           这是我添加监听器的地方:
           //添加编辑监听器   这很重要
           tree.getCellEditor().addCellEditorListener(new CellEditorAction());
           //.下面是编辑的具体结点
           tree.startEditingAtPath(path); 
运行结果如下:   
广西
[中国, 新节点]
新节点
=======编辑结束
新添加的分组:新节点
==========编辑取消
=======编辑结束
新添加的分组:001
我每次编辑的取值结果都是编辑前的值,而不是编辑后的值
我默认的结点名称是“新节点”,但编辑后应该是001,而其实际结果滞后了,还是“新节点”,等我下次再编辑为0010的时候,现在的值反而变成001.求高手指教!