In lwuit, How can I dispose multiple dialogs by using single? If there is 2 dialogs are shown (One over another) and if I dispose first Dialog then next dialog . But I need to close(dispose) both dialogs and display Form. Is there any method to do this?
Asked
Active
Viewed 61 times
2 Answers
0
Why don't you use the same Dialog
to show that?
I mean. Show the first Dialog
. After this, show the next Dialog
using the same object (clean TextArea
, Label
, everything that you are using for showing the info inside the Dialog
) and put the new data. After that close this only one Dialog

Mun0n
- 4,438
- 4
- 28
- 46
0
I also had the same problem, as i believe it is unintended behavior. I passed a parentForm parameter to the dialog and then i just use parentForm.showBack(); after i call dialog.Dispose(). But you need to be sure that either the dialog is visible or the parentForm so as not to overide an unrelated screen if the user closes and quickly moves to another form.
currDialog.dispose();
if(currDialog.isVisible() || parent.isVisible())
parent.showBack();
I guess another solution could be using a singleton class for the dialog calls.

Ajibola
- 1,218
- 16
- 28