CyprUS
CyprUS

Reputation: 4239

How to detect a webpage HAS been loaded in java

I am using the following code to display a webpage:

      String 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

Upvotes: 0

Views: 121

Answers (1)

Bala R
Bala R

Reputation: 109027

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.

Upvotes: 1

Related Questions