public class Example implements EntryPoint {
AbsolutePanel absolutePanel =new AbsolutePanel();
Button reset = new Button("Reset");
Button[][] buttons = new Button[20][20];
Grid grid = new Grid();
public Example(){
absolutePanel.setSize("400","400");
absolutePanel.add(reset);
grid = new Grid(20,20);
for (int i = 0; i < buttons.length; i++) {
for (int j = 0; j < buttons.length; j++) {
buttons[i][j] = new Button();
grid.setWidget(20,20,buttons[i][j]);
}
}
absolutePanel.add(grid);
}
public void onModuleLoad() {
// startGame(9,9,10);
RootPanel.get().add(absolutePanel);
}