posted 22 years ago
Hi,
I thought I had understood this whole gridbaglayout thing but clearly not ... I have 4 empty panels arranged on a contentPane. LayoutManager is GridBagLayout, and I think I should end up with 2 columns and four rows, with each component 1 column wide, but different rows high :
Top Left Panel is
gridx = 0, gridy = 0,
gridwidth= 1, gridHeight = 2
Lower Left Pane is
gridx = 0, gridy = 2,
gridwidth= 1, gridHeight = 2
So I expect these two to be the same height and they are.
Then, in the second column I have
Top Right Panel is
gridx = 1, gridy = 0,
gridwidth= 1, gridHeight = 1
Lower Right Panel is
gridx = 1, gridy = 1,
gridwidth= 1, gridHeight = 3
Now, because I set the relative heights as stated, I was expecting the lower right panel to be taller than the Top right Panel. However, all four panels are the same height. What am I doing wrong please ? (I have made sure all 4 components are exactly the same type - they are empty JPanels, and I am working in Visual Age's visual Composition editor)
Many Thanks,
kate