How to detect a webpage HAS been loaded in java
I am using the following code to display a webpage:
Strin开发者_StackOverflow社区g downloadURL="http://in.finance.yahoo.com/echarts?s=%5ENSEI#symbol=%5Ensei;range=1d;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=;";
java.awt.Desktop myNewBrowserDesktop = java.awt.Desktop.getDesktop();
java.net.URI myNewLocation = new java.net.URI(downloadURL);
myNewBrowserDesktop.browse(myNewLocation);
Now , i want to detect when the page has been fully loaded. ( The wait dialog is to displayed till then ). How to do i go about doing that? Thanks in Advance
I'm afraid you can't. Once you call browse(), if all goes well, the operating system takes care of launching the URI in the default browser and there is nothing (like a handle) returned to your application so it's not possible.
精彩评论