This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a scollpanel which contains dynamic content, but I can not find a way to fix the content to the top of the panel, the content alwats starts in the middle.
The panel is set to "vertical-scrollable" so as the content grows the display is fine as it seems to be pushed up the panel and the scrollbar allows the user to view the full content, but if there is only a few lines to the content then it appears slap-bang in the middle! I have looked but the ScollPanelayout manager does not seem to have any 'NORTH' type of flag.
It sounds like your scroll pane is not being laid out properly. You should look at the layout manager for the container into which you've placed the scroll pane. Some layout manager make it easy to direct that you want a component to take up available space (vertically, horizontally or both). GridBagLayout, for example does this.
Kevin P Smith
Joined: Feb 18, 2005
I'll have a looking into the layout manager.... to be continued (no doubt)