Still very new to
Java and want to create a layout with 3 rows and 1 column, but with the rows of different and fixed heights.
setSize seems to have no effect on the contents, so I must be going about it the wrong way.
Can anyone give me an example of what I need to do?
Many thanks in advance.
Paul.
public Tower(JFrame frame) {
super(new BorderLayout());
setLayout(new GridLayout(3, 1));
JLabel lCDLabel = new JLabel();
JFrame buttonsFrame = new JFrame("Buttons");
JPanel buttonsPanel = CreateTowerButtons();
buttonsPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
buttonsPanel.setSize(new Dimension(100, 300));
lCDLabel.setSize(new Dimension(50, 50));
setBackground(Color.black);
add(lCDLabel);
add(picLabel);
add(buttonsPanel);
tc.SetUpGame();
}