GridBagLayout: Direction of Addition (8) |
---|
// btn5 right of btn4 c.gridx = GridBagConstraints.RELATIVE; c.gridy = 2; gridbag.setConstraints(btn5, c); // btn6 below btn5 c.gridx = 2; c.gridy = 3; // absolute, for variety gridbag.setConstraints(btn6, c); resize(400, 200); setVisible(true); }
Slide 77 | ©Copyright 1997 | Jan Newmarch |