JPanel pannello = new JPanel(); //Crea il pannello pannello.setLayout(new BorderLayout());
JButton b_nord = new JButton("Nord"); JButton b_est = new JButton("Est"); JButton b_ovest = new JButton("Ovest"); JButton b_sinistra = new JButton("Sinistra"); JButton b_destra = new JButton("Destra"); JPanel pann_1 = new JPanel(); JPanel pann_2 = new JPanel(); pann_1.setLayout(new BorderLayout()); pann_2.setLayout(new GridLayout(2,1); pann_1.add("North", b_nord); pann_1.add("East", b_est); pann_1.add("West", b_ovest); pann_2.add(b_sinistra); pann_2.add(b_destra); pann_1.add("Center", pann_2);