LWUIT javame Dialog dispose

317 Views Asked by At

I cannot seem to make the dialog in my javame program disapear. I have used dispose but nothing. Any help. Here is the code

Dialog d=new Dialog("Comment added");
        Label lb=new Label(response);
        d.setLayout(new BorderLayout());
        d.addComponent(BorderLayout.CENTER,lb);
        d.show();
        d.dispose();
1

There are 1 best solutions below

0
On

the d.show(); blocks until the dialog disposes, therefore you are not getting to the next line of code. add a Button to your dialog and on the button event invoke dispose.