BrowserComponent With InfiniteProgress

13 views
Skip to first unread message

Michael Osakede

unread,
Dec 20, 2020, 8:30:01 AM12/20/20
to CodenameOne Discussions
Hi,

How do I add an Infinite progress till the WebPage is fully loaded?

Form hi = new Form("Hi World");
        hi.setLayout(new BorderLayout());
        final BrowserComponent wb = new BrowserComponent();
        hi.addComponent(BorderLayout.CENTER, wb);

        final Dialog ipDlg = new InfiniteProgress().showInifiniteBlocking();
        wb.setURL("https://www.codenameone.com");
        wb.addWebEventListener("onLoad", new ActionListener() {

       
            @Override
            public void actionPerformed(ActionEvent evt) {
                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }
 });
 

        hi.show();
        ipDlg.dispose();

Regards,
Michael

Shai Almog

unread,
Dec 20, 2020, 9:05:56 PM12/20/20
to CodenameOne Discussions
Reply all
Reply to author
Forward
0 new messages