GridBagLayout: Multiple Rows (2)

GridBagMultiRow()
{
   GridBagLayout gridbag = 
                 new GridBagLayout();
   setLayout(gridbag);
   GridBagConstraints c = 
                 new GridBagConstraints();
   c.weightx = 1.0;
   c.fill = GridBagConstraints.BOTH;

   // three in one row
   gridbag.setConstraints(btn1, c);
   gridbag.setConstraints(btn2, c);
   c.gridwidth = GridBagConstraints.REMAINDER;
   gridbag.setConstraints(btn3, c);


Slide 80 ©Copyright 1997 Jan Newmarch