Article View: borland.public.jbuilder.java.swing
Article #13348Re: HOW TO {Component, JPanel, JScrollPane, FlowLayout}
From: John P. McGrath
Date: Mon, 17 Aug 1998 00:00
Date: Mon, 17 Aug 1998 00:00
35 lines
1910 bytes
1910 bytes
Thierry Janaudy <janaudy@yahoo.com> wrote: > I have something like a JScrollPane and a JPanel inside it with a > FlowLayout. > I have a button.. when an action is performed on that button, I would like > to add componant (Transparent Image for Example) in the panel so that > there is only a vertical scrollbar (like TextArea)....and the component > locates well, > next to the previous one ..etc... If I understand your question, the button and adding have not much to do with the problem you are posing. It sounds like what you are looking for is a LayoutManager that lays out a container in a manner similar to a FlowLayout, but it restricts the width to that of the containing JViewport. Is this correct? I have written such an animal. I seem to recall that it was not quite as general as FlowLayout, since the components that it was used to lay out were always the same size. It could easily have been extended, but I had no use for the added generality. Unfortunately, I am not sure if I will be able to send it to you. I wrote it for a project at work, so I will have to get permission to release it. This may or may not be possible. If you are interested, e-mail me at jpm@nscs.fast.net. -- John P. McGrath <mcgrath@enter.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<01bdc9a5$9c082c10$3347aacc@ferd>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bdc755$88ba4be0$5c018aa4@urd70>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,e2300b39181e70a5
X-Google-Attributes: gid111d45,public
From: "John P. McGrath" <mcgrath@enter.net>
Subject: Re: HOW TO {Component, JPanel, JScrollPane, FlowLayout}
Date: 1998/08/17
Message-ID: <01bdc9a5$9c082c10$3347aacc@ferd>
X-Deja-AN: 381865027
Content-Transfer-Encoding: quoted-printable
References: <01bdc755$88ba4be0$5c018aa4@urd70>
Content-Type: text/plain; charset=ISO-8859-1
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing