Author Topic:   ipadx , ipady ??
psethura
ranch hand
posted April 14, 2000 09:16 AM         
From test point of view, how much a person should know in GridBagLayout?

a) what is ipadx and ipady?

raghavendra
greenhorn
posted April 14, 2000 02:11 PM             
"The ipadx and ipady members specify the vertical and horizontal gap (or padding) for components"
hope this helps,
raghavendra

maha anna
bartender
posted April 14, 2000 02:50 PM             
To be more specific, ipadx is the no. of pixels , the component's width(or atlease preferred width) will be stretched at both sides (left and right). For example if a button's width (it may be greater than or equal to its minimum width) = 100 pixels, then gbc.ipadx = 10; makes the component's total width = 10(on left) + 100 + 10 (on right) = 120 pixels. So this 120 pixels is the bare minimum for this component. But also note that all components is a col will have SAME width and EACH col can have DIFFERNET widths. So if another component is added later in the SAME col, whose minimum width is greater than this 120 pixels component's width, then all the component's 'display width' in this col will be stretched to accomodate the new-comers's and whether this 120 pixel component will be stretched in its width depends on the .fill field of the GBC minimum size. So we can't say the 120 pixels will be CONSTANT at all the time. We can maximum say the minimum 120 will be retained for our original component.Because if this 120 pixel comp. has got its .fill field as HORIZANTAL then it's width will be stretched.
regds
maha anna

[This message has been edited by maha anna (edited April 14, 2000).]

|