| Author |
Can you do JScrollPane content NORTH?
|
Kevin P Smith
Ranch Hand
Joined: Feb 18, 2005
Posts: 362
|
|
Hi guys,
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.
Any ideas?
|
 |
Mark E Hansen
Ranch Hand
Joined: Apr 01, 2009
Posts: 639
|
|
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
Ranch Hand
Joined: Feb 18, 2005
Posts: 362
|
|
|
I'll have a looking into the layout manager.... to be continued (no doubt)
|
 |
 |
|
|
subject: Can you do JScrollPane content NORTH?
|
|
|