create a simple java Application program that shows the use of GridLayout to arrange the Button

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

public class Gdl extends JFrame{

    public Gdl(){
        setLayout(new GridLayout(4,4));
        for(int i=1;i<5;i++)
        for(int j=0;j<4;j++)

        add(new JButton(" "+i));
        setSize(200,300);
        setVisible(true);

    }
    public static void main(String args[])
    {
        Gdl bt = new Gdl();
        bt.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
    }
}