No subject
Sat Nov 12 19:29:10 PST 2005
The Box class can create several kinds of invisible components that
affect layout: glue, struts, and rigid areas. If all the components
your Box contains have a fixed size, you might want to use a glue
component (returned by createGlue) to control the components' positions.
If you need a fixed amount of space between two components, try using a
strut (createHorizontalStrut or createVerticalStrut). If you need an
invisible component that always takes up the same amount of space, get
it by invoking createRigidArea.
> -----Original Message-----
> From: Reynshteyn, Leonid [mailto:leonid.reynshteyn at gs.com]
> Sent: Thursday, December 14, 2000 11:30 AM
> To: advanced-java at xcf.berkeley.edu
> Subject: Layout Management & XML.
>
>
> Hi!
>
> I am working on a Java applet that would create the graphical
> layout based
> on an XML template that defines which components should
> appear on the screen
> (displayed by the applet).
> The XML does not specify any appearance-specific attributes
> for simplicity,
> just component names/content information. The ordering of
> components on the
> screen will be specified by the order in which they appear in
> that XML file.
> I would like to use Java Swing for this.
>
> Question: It seems like FlowLayout is the natural fit for
> this kind of task.
> However, based on what I've read so far, it may not even display some
> components if the user minimizes the browser window and
> overall, there's
> virtually no control over layout of components. I want to have some
> constraints so the screen look nice with all the buttons,
> textfields, panels
> appearing in approximately right place.
>
> My idea is to divide the screen into several fixed-sized
> panels and lay
> components out in the panels using FlowLayout.
>
> Any ideas would be greatly appreciated.
>
> Thanks.
>
---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu
More information about the Advanced-java
mailing list