Wai Iu,
It is the other way around.
When you set the fill field of GBC to BOTH, then the anchor field has no effect The idea here is both fields anchor and fill comes into picture when a component in a row/col gets extra space than the the size of the component itself. So when a comp gets lots od space, where to
anchor the component? In
Java AWT if you take any component, it is of shape
Rectangle. Isn't? So GBC has totally 8 compass directions to anchor the comp. Go from NORTH to clockwise. NORTH/NORTHEAST/EAST/SOUTHEAST/SOUTH/SOUTHWEST/WEST/NORTHWEST. So the tiny

comp. can be set to one of the above 8 directions. The anchor field has done its part.
The fill field is used to
In which direction (Horizantal/vertical/None/Both) to stretch. When you set this field to BOTH, the LayoutManager stretches the comp to ALL available space right? Then where is the qstn of where to anchor the comp? It is spread all over its allocated space already.
Also note that GridBagLayout gives the
combined effect of all its fields (fill/anchor/ipadx/ipady/gridx/gridy/gridwidth/gridheight/weightx/weighty/insets...Are they enough

)when placing a comp.
regds
maha anna
[This message has been edited by maha anna (edited April 09, 2000).]