I have a JTree
embedded in a JScrollPane
. When the JTree
grows bigger than the display can show, the remainder of the tree is located at the bottom outside of the visible range. I expected the JScrollPane
to start displaying vertical scrollbars if this happens so that you can scroll the remainder into view. The vertical scrollbars do not appear at all if the JTree
is expanded and doesn't fit. Here is how it looks like:
I have both, the horizontal and vertical scrollbarPolicy
set to as needed
. I also tried embedding the JScrollPane
containing the JTree
into a JPanel
but it didn't help. I'm using the UI designer
in IntelliJ IDEA
to build the GUI by the way.
Any help on making the vertical scrollbars behave as expected? Forcing them to be shown at all times also doesn't work: They cannot be dragged down regardless.