3

I want to know about the GridFieldManager and how to know about that.

Bachi
  • 47
  • 4

1 Answers1

1

Try this one:

public class GridScreen extends MainScreen
{
GridFieldManager grid;  
public GridScreen() 
{
    setTitle("Grid Screen");
    createGUI();
}
private void createGUI() 
{
    setTitle("GridLayoutDemo");
    GridFieldManager grd=new GridFieldManager(3, 3, 0);
    grd.add(new LabelField("One",Field.FOCUSABLE));
    grd.add(new LabelField("Two"));
    grd.add(new LabelField("Three",Field.FOCUSABLE));
    grd.add(new LabelField("Four",Field.FOCUSABLE));
    grd.add(new LabelField("Five",Field.FOCUSABLE));
    grd.add(new LabelField("Six",Field.FOCUSABLE));
    grd.add(new ButtonField("Seven"));
    grd.add(new ButtonField("Eight"));
    grd.add(new LabelField("Nine"));
  //grd.insert(new LabelField("Insert"), 0, 2);
    grd.delete(1, 1);
 // grd.getBackground();
    add(grd);       
    grd.setColumnPadding(10);
    grd.setRowPadding(10);;
}
}

This is a sample GridDemo only; According to this you can do what you want; I gave only some fields focused not all; see this when you run this;

alishaik786
  • 3,696
  • 2
  • 17
  • 25