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

public class lez20070403_1 extends JFrame
{
	public lez20070403_1()
	{
		setTitle("nome finestra");
		setSize(400,400);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		setLayout(new GridLayout(2,2));
		JPanel p1, p2, p3, p4;
		
		p1 = new JPanel();
		p1.setLayout(new GridLayout(4,4));
		for (int h = 0; h < 16; h++)
			p1.add(new JButton("bottone "+h));
		add(p1);
		p2 = new JPanel();
		p2.setLayout(new GridLayout(2,2));
		for (int h = 0; h < 4; h++)
			p2.add(new JButton("bottone "+h));
		add(p2);
		p3 = new JPanel();
		p3.setLayout(new GridLayout(4,2));
		for (int h = 0; h < 8; h++)
			p3.add(new JButton("bottone "+h));
		add(p3);
		p4 = new JPanel();
		p4.setLayout(new GridLayout(3,7));
		for (int h = 0; h < 21; h++)
			p4.add(new JButton("bottone "+h));
		add(p4);
	}
	
	public static void main(String[] a)
	{
		lez20070403_1 f = new lez20070403_1();
		f.setVisible(true);
	}
}

