简体   繁体   English

如何在Java中创建反向JTree?

[英]How to create inverted JTree in Java?

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. 实际上我有兴趣在Java中创建一个倒置的JTree ,使得root存在于顶层,其子节点位于下一级,依此类推。 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. 正如我们所知,在简单JTree的情况下,子节点看起来在父节点的右侧扩展,但我想在我的项目中实现反向JTree ,其中子节点向下扩展,这给出了“TREE”类型的数据结构的外观。

As this is very essential for my project so can anyone suggest me the code for the above mentioned problem? 因为这对我的项目非常重要所以任何人都可以建议我上述问题的代码吗?

Thanks in advance. 提前致谢。

Then JTree is not the correct choice. 然后JTree不是正确的选择。 Perhaps, you should look into Java2D and stuff like that. 也许,你应该研究Java2D和类似的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM