开发者

Alert pop up with LWUIT

开发者 https://www.devze.com 2023-03-21 18:04 出处:网络
How to create the pop up window using LWUIT? I want to show an alert and that alert automatically dispose after 5 to 10 sec\'s.How to do this with LWU开发者_开发技巧IT?Use this code and show the alert

How to create the pop up window using LWUIT? I want to show an alert and that alert automatically dispose after 5 to 10 sec's. How to do this with LWU开发者_开发技巧IT?


Use this code and show the alert some periodic time.

        Dialog validDialog = new Dialog("Alert");
        validDialog.setScrollable(false);
        validDialog.setIsScrollVisible(false);
        validDialog.setTimeout(5000); // set timeout milliseconds
        TextArea textArea = new TextArea("...."); //pass the alert text here
        textArea.setFocusable(false);
        textArea.setIsScrollVisible(false);
        validDialog.addComponent(textArea);
        validDialog.show(0, 100, 10, 10, true);
0

精彩评论

暂无评论...
验证码 换一张
取 消