posted 22 years ago
I'd like to suggest that both Anchor and ipadx are valid answers. The effect of setting GridBagConstraints'fill equal to fill.BOTH makes the component fill its display area entirely.
Since the anchor field is used when the component is smaller than its display area (not the case when fill=fill.BOTH), this answer sounds reasonable to me.
The field ipadx (and ipady) are used to specify the number of pixels to be added to the component's minimum size. With the fill field set to fill.BOTH, aren't we assured that the component's minimum size is irrelevent?