bhè non è che sia molto difficile capire il codice che stà dietro per una grafica così semplice comunque..
codice:
...
GridBagLayout g = new GridBagLayout();
        this.setLayout(g);
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.weighty = 1;

        gbc.gridx = 0;
          gbc.anchor=GridBagConstraints.NORTH;

        for (int i = 0; i < 2; i++) {
            gbc.gridy = i;
            JButton jb1 = new JButton(String.valueOf(i));
            g.setConstraints(jb1, gbc);
            this.add(jb1);
        }
        gbc.gridx = 1;
        for (int i = 2; i < 4; i++) {o 
            gbc.gridy = i - 2;
            JButton jb1 = new JButton(String.valueOf(i));
            g.setConstraints(jb1, gbc);
            this.add(jb1);
        }
    ...

PS: prima volta che uso il GridBag