I have a LWUIT-application which I also want to run on Blackberry phones. For this I use the approach from the LWUIT Demo App - common implementation is placed in a separate project (the base), there is 1 more separate project for MIDP which depends on the base, 1 other for RIM which also deps on the base. The project for RIM produces a native RIM application. In RIM's world it's called CLDC app or RIMlet. So, my application is not derived from MIDlet, but from UiApplication. See below.
import net.rim.device.api.ui.UiApplication;
public class MyRimlet extends UiApplication implements Runnable {
Now the problem...
I use some library. The class from that library needs lcdui's Display for its initialization (ref2 javax.microedition.lcdui.Display). I can get a ref2 Display if I have MIDlet. For this I can use Display.getDisplay(MIDlet m) method. But I don't have MIDlet since my app is derived from UiApplication.
So, what should I do to initialize the class from external lib?
Please help me regarding this.