http://www.softbear.com/people/cory/articles/webtech.htm


Java Layout Managers

Java provides five layout managers in the Abstract Window Toolkit
(AWT), a package in the standard Java library: BorderLayout;
CardLayout; FlowLayout; GridLayout; and GridBagLayout.

BorderLayout divides a window into five areas: north, south, east,
west, and center. Each area holds one display component, placed on the
window in a position corresponding to its area name. For example, the
north component is placed on the top of the window, south is placed on
the bottom of the window, and so on. BorderLayout is most useful for
simple dialog boxes and windows that hold fewer than five display
components.

CardLayout makes a window act like a Rolodex. It has a drop-down menu
that allows the user to view a menu of "card" names and choose which
card to display. Only one card may be displayed at a time -- the
others are hidden until the user chooses a different card.

FlowLayout, the default layout option for Java applets, is modeled
after a typewriter. It lays out display components in a row from the
left edge of a window to the right. When it reaches the right edge of
the window, it starts a new row. FlowLayout works best when there are
a small number of display components.

GridLayout lays out display components on the squares of an imaginary
checkerboard. First, it divides the window into a grid of identically
sized squares, and then puts each display component into its own
square, resizing the component as necessary until it fits the
square. This layout option is most useful if all of the display
components look attractive with exactly the same widths and
heights. GridLayout also allows a grid of identically sized rectangles
if you prefer that to squares. GridBagLayout is an advanced version of
GridLayout that allows display components to span more than one
square. GridBagLayout is the most powerful layout manager in the AWT,
and arguably the most difficult to use.



> I'm not too familiar with the terms "layout manager" or "alignment manager".
> What do they do, how do they work?  Can you show an example (web)
> application or something? What are the programming requirements for such a
> feature?  How might it integrate with the DynAPI?
> 
> Leif
> 
> ----- Original Message ----- 
> From: "Raymond Irving" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 05, 2003 5:09 PM
> Subject: Re: [Dynapi-Dev] Blackboard Mode
> 
> 
> >
> > The blackboard mode allows you th change the html
> > content of the layer without deleting the children.
> >
> > It's works well with modern browsers and supports ns4
> > to some extent. The NS4 browser itself is limited in
> > features so there is not much that we can do.
> >
> > As for layouts someone would have to create a layout
> > or alignment manager.
> >
> > --
> > Raymond Irving
> >
> >
> >
> > --- [EMAIL PROTECTED] wrote:
> > >
> > > Can someone explain this in a bit more detail, I
> > > want to add it to the
> > > documentation.
> > >
> > > As near as I can till, it somewhat allows you to add
> > > multiple html
> > > items to a layer.
> > >
> > > It doesn't seem to work well if you add multiple
> > > layers to a layer.
> > >
> > > One of the things I am missing right now is a
> > > container class that has
> > > a layout manager method.
> > >
> > > I really want to be able to group layers, without
> > > needing to stuff
> > > them into a template of a table.
> > >
> > > For one, ns4 just doesn't seem to deal with it well.
> > >
> > >
> > >
> > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > Dynapi-Dev mailing list
> > > [EMAIL PROTECTED]
> > >
> > http://www.mail-archive.com/[EMAIL PROTECTED]/
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder.yahoo.com
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://www.mail-archive.com/[EMAIL PROTECTED]/
> >
> >
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://www.mail-archive.com/[EMAIL PROTECTED]/
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to