In a section of a view port I'm having two panels; above a tree and below a image. While loading the first time, the image panel below is not visible. If the user expand an item on the tree and select the leave-node, the image panel is shown and I'm resize the tree panel:
This works fine, but the scrolling position of the tree panel is wrong:
myTreePanel.setSize(400, windowHeight - myImagePanel.getHeight());
When I'm expand the last item in my tree and the tree is shown without scrolling, after showing the image panel and resizing the tree panel, the expanded item at the end of the tree isn't shown. The scrolling shows the upper section of the tree.
How can I focus the scrolling to the expanded item?