因为addTreeSelectionListener(...)这个方法的参数为TreeSelectionListener类型的,而你这个CreateTree类没有实现TreeSelectionListener接口,所以会报错。
你改成这样:
class CreateTree implements TreeSelectionListener {然后再加个方法:
public void valueChanged(TreeSelectionEvent e) {
  ....
}