Skip to main content

dialog cause new component can't be showed.

1 reply [Last post]
Anonymous

Hi,
I try to do the followings:

1) add list A to a form and display it.

2) after 10 seconds, show a wait dialog for a moment and close it.

3) remove list A, and add new list B.

The problem is, instead of B is displayed, List A is still on the screen
until I click on the screen. After many attempts, I found that if I remove
List A before showing the dialog, the problem is solved.

But I can't change the code like this because when the dialog is showed,
a thread will retrieve data from the internet and determine whether list A
or list B is showed. Any suggestion to solve this problem?

Thanks
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi,
Make sure you use the EDT for changing the UI in LWUIT. Use call
serially to return from the thread.
> Hi,
>
> I try to do the followings:
>
> 1) add list A to a form and display it.
>
> 2) after 10 seconds, show a wait dialog for a moment and close it.
>
> 3) remove list A, and add new list B.
>
>
> The problem is, instead of B is displayed, List A is still on the
> screen until I click on the screen. After many attempts, I found that
> if I remove List A before showing the dialog, the problem is solved.
>
> But I can't change the code like this because when the dialog is
> showed, a thread will retrieve data from the internet and determine
> whether list A or list B is showed. Any suggestion to solve this problem?
>
>
> Thanks

--
Shai Almog

LWUIT Blog http://lwuit.blogspot.com/
LWUIT FAQ https://lwuit.dev.java.net/faq.html
YouTube Channel http://www.youtube.com/user/vprise
Applications in LWUIT https://lwuit.dev.java.net/nonav/featuredapp.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net