import java.awt.*;
import java.applet.Applet;

public class Grid extends Applet {
  public void init () {
    int row = 0, col = 0; 
    String att = getParameter("row");
    if (att != null)
      row = Integer.parseInt(att);
    att = getParameter("col");
    if (att != null)
      col = Integer.parseInt(att);
    if (row == 0 && col == 0) {
      row = 3; col = 2; 
    }
    setLayout(new GridLayout(row, col));
    add(new Button("Java"));
    add(new Button("C++"));
    add(new Button("Perl"));
    add(new Button("Ada"));
    add(new Button("Smalltalk"));
    add(new Button("Eiffel"));
  }
}