GWT : Composite not displaying

Posted by animatrix30 on Stack Overflow See other posts from Stack Overflow or by animatrix30
Published on 2010-05-08T20:15:24Z Indexed on 2010/05/08 20:18 UTC
Read the original article Hit count: 152

Filed under:
|
|
|
|

I have a this code for the layout :

grid = new Grid(15, 15);
        tiles = new Tile[15][15];

        for (int i = 0; i != 15; i++)
        {
            for (int j = 0; j != 15; j++)
            {
                tiles[i][j] = new Tile('a');
                grid.setWidget(i, j, tiles[i][j]);
                tiles[i][j].setVisible(true);
            }
        }

        initWidget(grid);

I know it is working, because if I change the tile, by a Button, it works well.

Now my Tile class :

public class Tile extends Composite {

char character;

public Tile (Character c)
{
    this.character = c;
    buildWidget();
}

private void buildWidget()
{
    Label l = new Label(this.character+"");
    initWidget(l);
}

Why does all tiles are not displayed ?

Thanks for your help !

© Stack Overflow or respective owner

Related posts about gwt

Related posts about composite