my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Stretching panel expands tabbed pane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Stretching panel expands tabbed pane" Watch "Stretching panel expands tabbed pane" New topic
Author

Stretching panel expands tabbed pane

Tom Sakra
Greenhorn

Joined: Oct 09, 2010
Posts: 8
I've narrowed my problem down to a panel that's dynamically filled with some check boxes, which is located inside a pane of my tabbed pane-component. I suspect the problem is related to the items below the panel that contains the check boxes. Because the tabbed pane expands in height equal to the size of the panel with the check boxes. Is there any way of letting the subsequent components utilize the available space instead of acquiring more space (there's plenty of room, so there's no need for it to expand)?. I also want the user to be able to maximize the window, so I can't just use a fixed size either.

Since I'm using the NetBeans GUI builder, posting the code isn't really an option. I know this gets very abstract without screenshots or code, but I hope I've made my problem clear enough for you to understand my problem.

Update: I actually solved this as I was writing the post, but I decided to post it anyway, so that maybe anyone else encountering the same problem as me could find a solution here. Anyway, here's what I did: I put my subsequent components in a panel, then setting the bottom space around the component to default and also ticking off the "resizable" check box belonging to it. I also made sure that the panel containing the check boxes doesn't have vertical auto resizing, but instead attached a BoxLayout to it.
Guy Mograbi
Greenhorn

Joined: Jan 10, 2011
Posts: 4

Even if you can't paste code, a screenshot would be nice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stretching panel expands tabbed pane