Custom JPanels inside another JPanel.
- From: pek <kimwlias@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 17:55:29 -0000
So I have this JPanel that I add a scroll pane to make it scrollable.
I created a class that is a subclass of JPanel, lets call it
CustomPanel. CustomPanel basically has some labels, buttons etc. What
I do is add a CustomPanel to the JPanel. What I want is that
CustomPanel should have the width of JPanel but it's own height. That
way JPanel ultimately is contains a list of CustomPanels. What the
problem is that I tried to use BoxLayout and GridLayout. Let's say
that JPanel's height is 4 times the CustomPanel's one. If I add one
CustomPanel, that will expand and use all of JPanels area. If I add
more that 5 the CustomPanels are correctly added with the correct
size. So, I can't figure out what Layout Manager to use.
Any help?
Thank you.
.
- Follow-Ups:
- Re: Custom JPanels inside another JPanel.
- From: Joshua Cranmer
- Re: Custom JPanels inside another JPanel.
- Prev by Date: Re: For-loop optimization question
- Next by Date: Re: Need efficient search strategy in list of time intervals
- Previous by thread: For-loop optimization question
- Next by thread: Re: Custom JPanels inside another JPanel.
- Index(es):