DefaultMutableTreeNode fatherNode;  void jTree2_mouseClicked(MouseEvent e) {
       if(jTree2.getPathForLocation(e.getX(),e.getY())!=null){
         fatherNode=(DefaultMutableTreeNode)jTree2.getPathForLocation(e.getX(),e.getY()).getLastPathComponent();     
       }//end of if !null
  }///////////////end of void
 void jButton1_actionPerformed(ActionEvent e) {
    DefaultMutableTreeNode newNode=new DefaultMutableTreeNode("new node");
    fatherNode.add(newNode);
    jTree2.UpdateUI();     
  }