Hi,
I've got the next "really not cool" problem:
I've got a Canvas that draws a "please wait" screen with a hourglass en bla bla bla..... It's animated by using a Thread that changes the state of the Canvas (just an int that's changed every interval)
The Canvas is showed if data is send to the server. Sometimes a Form was first shown (optionForm) before the WaitCanvas is set as current screen and sometimes it is set as current after another Canvas was shown.
My problem is that if the WaitCanvas is shown after a Form, an empty screen is showed (Command's are showed, but no graphics) But if the WaitCanvas is showed after another Canvas it is showed!
The following code always outputs: wait shown!
But when I place the following code in the paint method of the WaitCanvas it outputs NOTHING... because the paint method is never called (but the Thread calls the repaint method every interval (300 ms))Code:display.setCurrent(waitCanvas); if(waitCanvas.isShown()) System.out.println("wait shown"); else System.out.println("wait is not shown");
Can anybody enlighten me?Code:if(this.isShown()) System.out.println("painting showed"); else System.out.println("painting unShowed");

) But if the WaitCanvas is showed after another Canvas it is showed!
Reply With Quote

