Grid control : Grid « GWT « Java






Grid control


package com.java2s.gwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Grid;

public class GWTClient implements EntryPoint{
  public void onModuleLoad() {

    Grid grid = new Grid(4, 4);
    for (int r = 0; r < 4; ++r) {
      for (int c = 0; c < 4; ++c) {
        grid.setWidget(r, c, new HTML("A"));
      }
    }


    RootPanel.get().add(grid);
  }
}



           
       








GWT-grid.zip( 2 k)

Related examples in the same category

1.Grid Cell Formatter