2011-11-22 91 views

回答

6

您不能直接将字符串转换为TreeNode来创建TreeNode,因为它必须实现TreeNode或其扩展MutableTreeNode接口。

DefaultMutableTreeNode node = new DefaultMutableTreeNode("your string"); 

对于进一步的信息和实施例请参阅tutorial

+0

1也看到这个[答案](http://stackoverflow.com/q/8210759/230513)。 – trashgod

相关问题