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
GridBagConstraints.CENTERGridBagConstraints.NORTHGridBagConstraints.NORTHEASTGridBagConstraints.EASTGridBagConstraints.SOUTHEASTGridBagConstraints.SOUTHGridBagConstraints.SOUTHWESTGridBagConstraints.WESTGridBagConstraints.NORTHWEST
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.