你意思是不是双击树叶子事件,给树添加鼠标监听器,鼠标事件有个getClickCount()的方法,返回鼠标电击次数,如单击或双击等.当getClickCount()==2时为双击

解决方案 »

  1.   

    在jtree中添加addTreeSelectionListener(TreeSelectionListener tsl) 
    事件TreeSelectionListener。然后利用TreeSelectionEvent对象得到
    TreePath getNewLeadSelectionPath() 在利用TreePath的getLastPathComponent()得到一个Object
    你将其造型为DefaultMutableTreeNode,就是你双击的节点。
      

  2.   

    调用addMouseListener方法,给JTree增加一个鼠标事件监听器
      

  3.   

    就用addTreeSelectionListener就可以实现