tags:

views:

70

answers:

3

Hi,

I have a problem. I created a PopupPanel and have shown it. Now the problem is i want to hide it after 1 minute. Can u suggest me, Please........ But one more thing, In that one minute process should not be stopped or pause.

Thanks,

Vara Kumar PJD

A: 

You could use Thread.sleep(60000);

But be careful you have to chose the correct thread to pause. And exception handling also has to be added.

Roflcoptr
There's only one thread. GWT is about javascript running in a browser...
z00bs
Ah i didn't saw the tag.
Roflcoptr
+1  A: 

java.util.Timer

zengr
+3  A: 

GWT has its own implementation of Timer.

Here a really small example:

public void onModuleLoad() {
    final PopupPanel popUp = new PopupPanel();
    Label text = new Label("gone in a sec");
    popUp.setWidget(text);

    Timer timer = new Timer() {

        @Override
        public void run() {
            popUp.hide();
        }

    };

    popUp.center();
    timer.schedule(3000);
}
z00bs