Can someone please tell if my ans to the foll are right
Which of the following is true regarding GridBagLayout
A) if a component has been given fill both is true, then as the container resizes the component resizes
B) The number of rows and columns are fixed while loading the components.
C) The number of rows and columns are fixed while loading the layout itself .
D) if a component has a non-zero weightY value, then the component grows in height as the container is resized
my ans : a
but i'm not sure about b or c
d according to me is false as its a relative to the weightY values of the other comp in teh column. Besides resize could even mean making the container smaller
------
Q2) You want a component to retain its width, but not the height when resized.
How will you achieve this ?
A) Place the component in North or South in a BorderLayout
B) Place the component in the Center of a BorderLayout
C) Place the component in East or West in a BorderLayout
my ans : C - as the height here would be the preferred size of the component - which should remain unchanged inspite of resizing.
Thanks a lot
shilpa
!
[This message has been edited by eskay kumar (edited September 12, 2000).]