anchor

When a component is smaller than its display area, the anchor field specifies where to place it in the grid cell. The mnemonic constants you use for this purpose are similar to those used in a BorderLayout but a little more specific. They are

The default is GridBagConstraints.CENTER. This is not explicitly set in the calculator applet, because the components are large enough, relative to their display areas, that it really doesn't matter where they go and the default of center is fine.


Previous | Next | Top
Last Modified June 30, 1998
Copyright 1997, 1998 Elliotte Rusty Harold
elharo@metalab.unc.edu