Article View: borland.public.jbuilder.java.swing
Article #7869Re: FlowLayout and JScrollPane
From: Thomas G�lden (p)
Date: Mon, 04 Dec 2000 00:00
Date: Mon, 04 Dec 2000 00:00
65 lines
2656 bytes
2656 bytes
I looked, but I cannot find any row or col property of FlowLayout or any methods to set limits for the columns or row. The only comparable thing you can set are the vgap and hgap properties. Are you using any special flavor of flow layout ? Thanks Thomas G�lden Thomas.Guelden@t-online.de "Rich Wilkman" <richw@formlessvoid.com> schrieb im Newsbeitrag news:3A2BD51C.93E3C94@formlessvoid.com... > Thomas: > > I'm pretty sure that's just FlowLayout doing what it's supposed to do. FL will > wrap when it hits the end of it's container. If you stick it in a scroll pane > then it never hits the right edge of the container (the scroll pane takes over > and you get the H bar). Try locking down the number of columns in the > FlowLayout by setting the cols value to something other than 0. Make sure Rows > is 0 and try again. I can't remember if I tried this when I ran into this > problem. > > You could also extend Flow Layout to wrap after a certain number of items exist > on a row. > > -Rich > > > "Thomas G�lden (p)" wrote: > > > I try to develop an image browser, where thumbnails of images are put in > > rows. > > So to use the FlowLayout as the layout for my panel seems to be the right > > choice, because it puts components in a new row when one row is full, > > depending on the width of the panel. However, when the rows extend the > > height of my panel I would like to show a scrollbar on the right of the > > panel. > > > > So I thought to put a scrollpane into my panel. But this results in a > > different behaviour of my FlowLayout since new rows are not created and a > > horizontal scrollbar is created at the bottom. > > > > I would like to have the original behaviour of my FlowLayout kept, and only > > have a vertical scrollbar created, when I have to many rows for my panel to > > display. > > > > How can I achive this behaviour ? > > > > Thanks > > > > Thomas G�lden > > Thomas.Guelden@t-online.de >
Technical Details
Message-ID:
<90gpeb$hqv9@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<90dkq2$fr4@bornews.inprise.com> <3A2BD51C.93E3C94@formlessvoid.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,282a839afa7c07f X-Google-Attributes: gid111d45,public From: "Thomas G�lden \(p\)" <Thomas.Guelden@t-online.de> Subject: Re: FlowLayout and JScrollPane Date: 2000/12/04 Message-ID: <90gpeb$hqv9@bornews.inprise.com> X-Deja-AN: 701050465 References: <90dkq2$fr4@bornews.inprise.com> <3A2BD51C.93E3C94@formlessvoid.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Organization: Bayerisches Geologisches Landesamt X-MSMail-Priority: Normal Reply-To: "Thomas G�lden \(p\)" <Thomas.Guelden@t-online.de> Newsgroups: borland.public.jbuilder.java.swing