If you want to lock the screen orientation in LWUIT, you must use a combination of the following methods.
Display.isPortrait() Returns true if the device is currently in portrait mode. Display.canForceOrientation() Returns true if the device allows you to impose orientation using code, phones with functions do not allow this, although some of them include a jad property that allows you to use this function. Display.lockOrientation(boolean portrait) On devices that return true for canForceOrientation (), this method can block the orientation of the device in either portrait or landscape mode.
Hope this helps you.
source share