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

// Beispiel mit GridLayout
// Schalter nehmen die gesamte Breite ein
public class GridLayout1 extends JFrame {


  //Frame konstruieren
  public GridLayout1() {
    setSize(500, 300);
    setDefaultCloseOperation(
         JFrame.EXIT_ON_CLOSE );
    setTitle("GridLayout1");
    setGUI();
  }

  private void setGUI() {
     JPanel panel;
     JButton bn;
     Integer I = new Integer(0);


    this.getContentPane().setLayout ( 
          new GridLayout(5,3) );
    for (int i=0; i<15; i++) {
      bn = new JButton( Integer.toString(i+1)  );
	 Font f = new Font("Arial", Font.BOLD,18);
      bn.setFont( f  );
      this.getContentPane().add(bn);
    }

  } // create



  public static void main(String[] args) {
    GridLayout1 frame = new GridLayout1();
    frame.setVisible(true);
  }


}
