views:

45

answers:

2

Hello everyone,

I am having, what i believe is a minor issue. I am developing a J2ME application which predominantly uses canvases for display. The problem is I have set all these canvases to fullscreen and when i navigate from one class to another i am first given a white screen and then taken to the canvas i intend to go. I am not understanding what i am doing wrong I am using the following statement for navigation

javax.microedition.lcdui.Display.getDisplay(MIDlet).setCurrent(Canvas);

Please help!!

A: 

There can be a lot of causes, from synchronization issues between different threads, to suboptimal code. Here are some things to try

  1. If your app uses threads then disable all except UI thread and proceed from here.
  2. Try setting a background color and see if it changes the white screen.
  3. Check on different handsets, it can be a handset related issue.
omermuhammed
A: 

Building a MIDlet using multiple different canvases is a pretty unusual approach in my experience. I'd recommend using only one, and adapting the behaviour of the paint method on each screen.

funkybro