|
-
July 21st, 2011, 06:02 PM
#7
Re: Swing - CardLayout and JTable
I don't know exactly what's happening with the layouts, but I don't see how anything can override the override.
However, the scroll pane relies on getPreferredScrollableViewportSize() to determine when to display scroll bars, and the preferredSize (by default) is the size that the component would like to be in order to display its contents in full. So most of the time, returning the preferred size from getPreferredScrollableViewportSize() will effectively disable the scroll bars, because, if the preferred size is honoured by the layout manager, the scroll pane will always seem to be big enough... or something... it's complicated, and there's no more wine left... I'll get the whiskey 
It's easy to cry "bug" when the truth is that you've got a complex system and sometimes it takes a while to get all the components to co-exist peacefully...
D. Vargas
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|