Skip to main content

Can javax.microedition.lcdui.Display and com.sun.lwuit.Display be used together?

Please note these forums are being decommissioned and use the new and improved forums at
3 replies [Last post]
Joined: 2004-03-21

I use a javax.microedition.lcdui.Display to display a dialog. Then I use com.sun.lwuit.Display to display a form. The form can not be displayed on nokia symbian 3. But it works with MOTODEV emulator. Please pay attention about the comment in the example code.
protected void startApp() throws MIDletStateChangeException {
Alert loadingDlg = new Alert( null, "LOADING...", null, null );
Gauge indicator = new Gauge( null, false, 100, 0 );
loadingDlg.setIndicator(indicator );
// When no this code, the form can be displayed.
.setCurrent( loadingDlg );


mainForm = new Form();
textArea = new TextArea( "ABC" );;

Is there any known issue about it? It is LWUIT 1.5.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-03-21

Maybe I found a way about this. That is call lcduiDisplay.setCurrent( null ), before the LWUIT form displaying. I tested it on the nokia symbian 3.

Joined: 2010-03-15

From my experience with LWUIT it is not a good idea to mix it with LCDUI. LWUIT EDT thread is separate from LCDUI main thread and LWUIT is not designed to be multi-threaded. It is great that your solution is working, but I would recommend using LWUIT Dialog class instead the LCDUI one.

Joined: 2004-03-21

I know. But the lwuit Display takes time to be initialized. On nokia e71, it takes about several seconds. I must give the user a hint that the app is running. So I need LCDUI to display a dialog for this.