package lezione_7;

import java.awt.*;

import javax.swing.*;

public class EsempioDuePannelli {

	public static void main(String[] args) {

		JFrame f = new JFrame("Questa è la mia finestra");
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JPanel pannello = new JPanel(new GridLayout(2,1));
		
		JPanel p1 = new JPanel(new GridLayout(1,0));
		JPanel p2 = new JPanel(new GridLayout(0,1));
		
		p1.add(new JButton("1"));
		p1.add(new JButton("2"));
		p1.add(new JButton("3"));
		
		p2.add(new JButton("4"));
		p2.add(new JButton("5"));
		p2.add(new JButton("6"));
		
		pannello.add(p1);
		pannello.add(p2);
		
		f.setContentPane(pannello);
		
		f.pack();
		f.setVisible(true);
	}
}
