public static int getScreenHeight(Form form) {
   int displayHeight = Display.getInstance().getDisplayHeight();
   displayHeight =
       displayHeight - form.getTitleComponent().getPreferredH() - form.getSoftButtonCount();
   if (form.getSoftButtonCount() >= 1) {
     displayHeight = displayHeight - form.getSoftButton(0).getParent().getPreferredH();
   }
   return displayHeight;
 }