import java.applet.Applet;
import java.awt.*;
import javax.swing.*;

public class GBTest1
    extends Applet
{
    public void init()
    {
	setLayout(new GridBagLayout());
	GridBagConstraints gbc = new GridBagConstraints();
	// Mod1
	gbc.fill = GridBagConstraints.HORIZONTAL;
	gbc.weightx = 1;
	add(new JButton("Button 1"), gbc);
	// Mod2
	gbc.weightx = 3;
	gbc.gridwidth = GridBagConstraints.REMAINDER;
	add(new JButton("Button 2"), gbc);
	gbc.weightx = 10;
	gbc.gridwidth = 1;
	add(new JButton("Button 3"), gbc);
	gbc.weightx = 1;
	gbc.gridwidth = GridBagConstraints.REMAINDER;
	add(new JButton("Button 4"), gbc);
	gbc.gridwidth = 2;
	gbc.weightx = 100;
	add(new JButton("Button 5"), gbc);
	setSize(300, 200);
    }
}
