Thank you but what about the height of the Title field. How do I get that?
Like, the first screen that uses this actually only has the title field and the rest of the space is devoted to the field in question.
The following does not work... (A vertical scroll bar is still there)
Code:
LabelField temp = new LabelField("this is the title", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH); //Temp is simply used so that the program can get the height of the title field, but failes
int heightOfFieldsAboveMainCM = temp.getHeight();
this.setTitle(temp);
mainCM.setHeight(Display.getHeight()-heightOfFieldsAboveMainCM);
this.add(mainCM);