canvas problem on a s60 device

Hi i am having a problem displaying a canvas on top of the previous canvas that was displayed. basicly i have tow canvas, one is a full screen canvas and the otehr is simply a rectangle box witha txt inside...

on the default colour phone emulator i can display both canvas on screen at the same time but on the s60 device it just displays the 2nd canvas with a white background?

here is the code for the 2nd canvas under the paintFrame method

publicvoid paint(Graphics g)

{

try

{

// g.drawImage(bg,0,0,Graphics.TOP|Graphics.LEFT);

// g.drawImage(load[counter],midx,midy,Graphics.VCENTER|Graphics.HCENTER);

int midy = getHeight() / 2;

g.setColor(49,65,143);

g.fillRect(5,midy+15,230, 36);

g.setColor(255,255,255);

g.drawString("Connecting to the server. Please wait.", 40,midy+8+15,Graphics.TOP | Graphics.LEFT);

g.drawImage(load[counter],18,midy+8+19,Graphics.VCENTER|Graphics.HCENTER);

}

catch(Exception e)

{

e.printStackTrace();

Alert alert =new Alert("error");

alert.setString("counter is " + counter);

alert.setTimeout(alert.FOREVER);

Display.getDisplay(root).setCurrent(alert);

}

}

All the canvas's are in Threads. i simply call display object to set this canvas has the corrent display.

I hope someone can help has lately this forum has not been so generous recently to peoples problems. i see alot of threads with absoluetly no response so hope someone here can take 5min of there time to help a fellow j2me developer. Thanks guys

[2098 byte] By [jonney69a] at [2007-11-27 4:46:36]
# 1

You're really only supposed to have 1 Displayable object on screen at once. (Canvas being a Displayable subclass)

the fact of it working on the emulator is more of a flaw than it not working on the s60.

solution?... you should really change the app design to be able to be drawn on a single canvas.

pandora_fooa at 2007-7-12 9:59:09 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

Ok is it possible to create a thread within a Thread class?i am trying to create a loading screen. At first, i displayed the loadings creen on full screen mode, but the idea was changed by the designer so now i have to display a small loading screen animation whilst the user can still see the previous screen. Similar to a Alert screen.

i have two sultions:

as explained above, create another thread from within this thread class.

Or create an alert screen(Tried this with a gauge and diddnt work properly)

Which solutution is better or can you find a better solution? cheers

jonney69a at 2007-7-12 9:59:10 > top of Java-index,Java Mobility Forums,Java ME Technologies...