如何在Java中创建倒置的JTree?
实际上,我有兴趣在 Java 中创建一个倒置的 JTree,使得根存在于顶部,其子节点存在于下一级,依此类推。正如我们所知,在简单的 JTree 情况下,子节点似乎在父节点的右侧展开,但我想在我的项目中实现反向 JTree,其中子节点向下展开这给出了“树”类型的数据结构的外观。
由于这对我的项目非常重要,所以有人可以建议我解决上述问题的代码吗?
提前致谢。
Actually I'm interested to create an inverted JTree
in Java in such a way that root exists at top and its child nodes at the next level and so on. As we know in case of simple JTree
the child nodes appears expanding on the right side of the parent node but I want to implement inverted JTree
in my project where child nodes expands downwards which gives an appearance of "TREE" type of data structure.
As this is very essential for my project so can anyone suggest me the code for the above mentioned problem?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那么
JTree
不是正确的选择。也许,您应该研究一下 Java2D 之类的东西。Then
JTree
is not the correct choice. Perhaps, you should look into Java2D and stuff like that.