Article View: borland.public.jbuilder.java.swing
Article #7873Re: FlowLayout and JScrollPane
From: Rich Wilkman
Date: Mon, 04 Dec 2000 00:00
Date: Mon, 04 Dec 2000 00:00
72 lines
3031 bytes
3031 bytes
Thomas: No, but my brain wasn't working and it was thinking of GridLayout. I think you have to pick a different way or make (or find) a variant on FlowLayout that does what you want. Sorry. -Rich "Thomas G�lden (p)" wrote: > 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:
<3A2C1011.5D566E99@formlessvoid.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<90dkq2$fr4@bornews.inprise.com> <3A2BD51C.93E3C94@formlessvoid.com> <90gpeb$hqv9@bornews.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,282a839afa7c07f X-Google-Attributes: gid111d45,public From: Rich Wilkman <richw@formlessvoid.com> Subject: Re: FlowLayout and JScrollPane Date: 2000/12/04 Message-ID: <3A2C1011.5D566E99@formlessvoid.com> X-Deja-AN: 701110207 Content-Transfer-Encoding: 8bit References: <90dkq2$fr4@bornews.inprise.com> <3A2BD51C.93E3C94@formlessvoid.com> <90gpeb$hqv9@bornews.inprise.com> X-Accept-Language: ja,en Content-Type: text/plain; charset=iso-8859-1 X-Trace: 4 Dec 2000 13:45:05 -0800, 209.144.169.10 MIME-Version: 1.0 Reply-To: richw@formlessvoid.com Newsgroups: borland.public.jbuilder.java.swing