Refresh webpage from java (applet)

hi,
does anyone know how i can refresh the webpage, which runs my applet.
So i'm looking for a piece of java code with activates the refresh of ie.
thanx

Comments

  • : hi,
    : does anyone know how i can refresh the webpage, which runs my applet.
    : So i'm looking for a piece of java code with activates the refresh of ie.
    : thanx
    :

    you can use this code in applet :
    [code]

    getAppletContext().showDocument(new URL("http://yoursite/yourpage.htm"));

    [/code]

    But you must know that if you refresh the page from wich the applet is loaded, the applet will be finalized...so getAppletContext().showDocument must be the last statement in the execution logic of your applet.

    [size=4][red](v)[/red][/size]

  • : : hi,
    : : does anyone know how i can refresh the webpage, which runs my applet.
    : : So i'm looking for a piece of java code with activates the refresh of ie.
    : : thanx
    : :
    :
    : you can use this code in applet :
    : [code]
    :
    : getAppletContext().showDocument(new URL("http://yoursite/yourpage.htm"));
    :
    : [/code]
    Thanks for your response.
    When I compile this, it doesn't recognize URL:

    BKE.java [67:1] cannot resolve symbol
    symbol : class URL
    location: class BKE
    getAppletContext().showDocument(new URL("test.html"));
    ^
    1 error

    any idea?
    thanx

    :
    : But you must know that if you refresh the page from wich the applet is loaded, the applet will be finalized...so getAppletContext().showDocument must be the last statement in the execution logic of your applet.
    :
    : [size=4][red](v)[/red][/size]
    :
    :

  • perhaps you should add import java.net.URL to yours import statements ?
    [size=4][red](v)[/red][/size]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories