Re: Newbie: Prevent stretching of widgets when using LayoutManagers?
- From: "Monique Y. Mudama" <spam@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 14:27:16 -0700
On 2006-02-28, francisrammeloo@xxxxxxxxxxx penned:
Hi all,
The problem with my Java components is that they stretch along when
I resize the window. They become way too big.
I've been able to prevent this using:
thePanel.setMinimumSize( thePanel.getPreferredSize() );
thePanel.setMaximumSize( thePanel.getPreferredSize() );
But once I started using JTabbedPane inside another JTabbedPane this
method does not seem to work anymore.
Can anyone help? Any help or hint will be greatly appreciated!
I can't give you the answer, but I think that the answer will depend
on which LayoutManager each of your panels is using. Different
LayoutManagers respect different size constraints.
What layout managers are you using?
You can probably address the sizing issues by using a different layout
manager.
--
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
.
- References:
- Newbie: Prevent stretching of widgets when using LayoutManagers?
- From: francisrammeloo
- Newbie: Prevent stretching of widgets when using LayoutManagers?
- Prev by Date: Blank Applet on Startup
- Next by Date: Borderless JToggleButton
- Previous by thread: Newbie: Prevent stretching of widgets when using LayoutManagers?
- Next by thread: Blank Applet on Startup
- Index(es):