开发者

Java JWebbrowser DocumentCompleted Event

I am working on chrriis.dj.nativeswing.swtimpl.components.JWebBrowser, I tr开发者_C百科ied demo and everything looks fine but I was unable to find any event to detect documentcomplete


There were no answers to original question for long time, so i am reporting my findings on the problem, if someone else may like to use.

As far I found there is no DocumentCompleted Event But I have achieved similar results by adding listeners using

webBrowser.addWebBrowserListener(new WebBrowserListener() {
            public void loadingProgressChanged(WebBrowserEvent wbe) {
                JWebBrowser wb = wbe.getWebBrowser();
                String pageUrl = wb.getResourceLocation();
                int progress = wb.getLoadingProgress();
                if (progress == 100) {
                    String jsCommand = "";
                    ....
                    wb.executeJavascript(jsCommand);

                }
            }
        }
...
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜