getLastPathComponent()方法试试。public Object getLastPathComponent() Returns the last component of this path. For a path returned by DefaultTreeModel this will return an instance of TreeNode.Returns:the Object at the end of the pathSee Also: TreePath(Object[])
DefaultTreeCellRenderer render = (DefaultTreeCellRenderer)this.getCellRenderer();
JLabel node1=(JLabel)render.getTreeCellRendererComponent(this,node.toString(),true,true,false,node.getLevel(),false);
System.out.println(node1.getText());
System.out.println(node1.getIcon().toString());
//node1.setText(node.toString());
//node1.setIcon(open);
this.repaint();