Java – how to automatically resize JTree objects?

I try to make a JTree object dynamically resize when expanding nodes By default, the object area is constant, and when expanded, the bottom part of the tree deviates from the view unless the window also resizes How can I solve it?

Solution

The setvisiblerowcount() method of JTree is particularly useful with the JScrollPane suggested by @ Andrew Thompson

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>