你可以在每个下面加一个空的子结点,等到展开的时候,删除原有的子结点,再加!!tmp.add(new DefaultMutableTreeNode(null));
tmp.removeAllChildren();