I want to add editfield and labelfield on same line . first editfield and then buttonfield . I have tried many times but it didn't work for me .I have added horizontal field manager and also used tables but none of it can help . The issue is it is not showing the buttonfield,i can see only editfield. enter code here
public class MyScreen extends MainScreen {
/**
* Creates a new MyScreen object
*/
public MyScreen()
{
// Set the displayed title of the screen
setTitle("MyTitle");
HorizontalFieldManager m= new HorizontalFieldManager(HorizontalFieldManager.FIELD_HCENTER);
final GridFieldManager grid = new GridFieldManager(4,4,0);
grid.setColumnPadding(5);
grid.setRowPadding(5);
EditField c= new EditField("","",5,EditField.EDITABLE);
// m.add(c);
Border border=BorderFactory.createRoundedBorder(new XYEdges(10,10,10,10),Border.STYLE_SOLID);
grid.setBorder(border);
ButtonField b= new ButtonField("Select ",ButtonField.CONSUME_CLICK);
//m.add(b);
grid.insert(b,1);
grid.insert(c,0);
//add(m);
add(grid);
}
}