Applet Reloading

In my applet I have global variables that change. Is there anyway to reload the applet at anytime so that the state of the global variables reset to their original values?
Thanks

why don't you just change the global values inside your applet??
well, you could refresh a page using Javascript, and applet can talk to javascript.
here. http://javascript.internet.com/buttons/refresh-button.html

Similar Messages

  • Button to make applet reload?

    I wanted to make a "restart" button for my game. Just wondering if there is a way to make the applet reload by the user pushing a button.
    -s64

    Two methods:
    1: Code the applet game so that it resets itself.
    2: Use LiveConnect to call a JavaScript function to reload the page.

  • Applet- Reload

    Applet->Reload result in closing of applet window... It calls....
    stop()->destory()->init()->start() . Still window is not displayed.
    Have i missed something ....
    Applet that i have created is the simplest of Applet with only print statemetns inside init(), start().......

    Hello Roger,
    thanks for your answers. I was talking about FF3 and the java sun 1.6 that
    came with ubuntu 8.04, and iirc fedora. But also epiphany under ubuntu 8.04
    and fedora with FF3 (current version, already removed it again) have troubles.
    Meanwhile I tried the new OpenJDK version and this one does not have the
    reload-problem. I noticed that combinations of FF2/Solaris FF2/Linux FF2+3/Win
    have no problems at all (all running some 1.6 versions).
    Thanks also for telling me about the 6u10 release, I realy wasn't aware of it. But
    my problem is not to make an applet working for myself. I want to develop an
    applet for others, I want to make it work with any version of java - and what I
    want is not so special, just 2 textareas and a bunch of buttons, reliable operational.
    So I will not try the 6u10 for now because even if it would work it wouldn't
    help me.
    Applets dying because of a page reload is - as I think - a horrible bug and I
    don't understand why such bug reports are a week later still marked as
    "unconfirmed" or "new". But I'm talking about mozilla bugs, so I'm probably
    at the wrong place for complaining about that.
    Another thing is that, for instance, opera on ubuntu 8.04 running the sun java
    1.6 has another kind of problems with reloads, the applet looses the focus
    on reload, one must focus another non-opera window and than focus back to
    the opera window in order to give the input focus to the applet.
    All that is very annoying if you just want to develop a little simple applet for anyone.
    Best,
    Leander
    ps.
    Btw, all browsers like FF2+3/IE6+7/Safari/Opera and the sun java 1.6 work perfectly
    under windows :-/ so problems with three popular browsers running under one of the most
    popular distributions lets me think that there is something wrong with the java support
    under linux.
    pps.
    why is there still no 64bit browser plugin?

  • Applet reloaded : IE 7/8 problem only

    Hello all,
    I have this very weird issue with an applet : it does not stop reloading.
    More precisely, in IE, my applet is loaded in an ajax loaded DOM element. When I remove the DOM element : stop() is first invoked by the browser, but start() follows just after... !!!
    I have tried System.exit() in the destroy method, but depending on the browser and the java version, that may kill the browser itself.
    Has anyone encountered the same issue ? How can one properly dispose of the applet instance ?
    Thanks in advance for your replies.
    Anthony C.

    You may find the solution here:
    http://java.sun.com/docs/books/tutorial/deployment/applet/lifeCycle.html

  • Browsing pages without applet reloading

    Hi.
    I'm working on a web project that has to keep the applet active over a multiple web pages.
    The applet should be active while the user is logged in. But because the reloading of the page will reload the applet, the work that the applet is doing will be restarted with the loading of the next page.
    So I hope that someone will help me to get over this problem with some advice.
    Regard.

              If you have your jsp workingDir in your WEBLOGICCLASSPATH or your JAVACLASSPATH,
              the jsps may recompile but will not reload.
              If you have your pageCheckSeconds set to -1, the page will not recompile.
              WLS is supposed to check if a JSP has been updated every pageCheckSeconds seconds.
              If you have WLS 5.1.0 sp8 or sp9, your pages may not recompile.
              Mike
              "venkatesh varma" <[email protected]> wrote:
              >
              >Hi Everybody
              >
              >Iam unable to get the jsp pages reloading automatically
              >when i request them..
              >
              >Please help me
              >thanks in Advance
              >venkatesh
              >
              

  • Frames and applet reloading

    Hello
    I have a for performance to stop my applet from reloading. I constructed a simple frameset with my applet in one and the view frame. It works fine the first time. I post out of the view to a struts configuration and to a getInputForward() to just get back with the same session but it reloads the applet. Is there a way to stop an applet from reloading if it is in a separate frame? I know I can use ajax, but would like to make this simpler approach work, if possible. tia.

    Hello
    It does work. I needed to set the input attribute and use the javascript location.reload() to update the page. It is here for some future search, or maybe not if it was so obvious, grin.

  • Applet reloading w/ html frames

    My applet is in a navigation bar, in its own html frame. When going to another page, I load a new html frame set. The applet html frame is still the same, the other frames change.
    HTML knows how NOT to reload the html frame that contains the applet, since it's the same as before. But the applet itself will reload everytime. I mean, the applet classes don't load again, but the applet process starts again, going through the init() method.
    I thought it would go to start() directly, which is what I want.
    What should I do?
    Miguel

    Applets need to be initialized when the page is loaded so you can't reliably avoid it. (making a static flag would solve the problem on some browsers so that the code is performed only when the class is loaded, but some browsers do reload the classes every time...)
    Why do you need to load a new frameset? You do know that you can specify the frame where the document will be loaded with the sencond parameter of the showDocument-method....

  • Force Java Applet Reload

    I'm trying to test a new version of a java applet. However, from the results I can tell that Safari is using a cached version of the jar file rather than downloading a new one from the website. I have tried emptying the cache, closing and reopening Safari, and reloading. However, I still get the old version. How can I force a reload?

    Dear Jason,
    Thanks to your help, I try and test and it's really work!!
    Today I look deeper to the source code of the web page, it post below, could I also add
    -Duser.language=en to the paragraph and get the same result?
    <OBJECT
    id="STUDYVIEWERV100"
    WIDTH="420"
    HEIGHT="200"
    codebase="/jre/j2re-1_4_1_01-windows-i586-i.exe#version=1,4,1,1">
    <PARAM NAME="scriptable" VALUE="true">
    <PARAM NAME="-TUNNELLING" VALUE="FALSE">
    <PARAM NAME="CODEBASE" VALUE="/lib">
    <PARAM NAME="CODE" VALUE="com.mitra.exhibclient.ExhibAppClass">
    <PARAM NAME="-VENDOR_NAME" VALUE="Agfa">
    <PARAM NAME="-SHOW_LOGIN_HISTORY" VALUE="false">
    <PARAM NAME="-SHOW_CHANGE_PASSWORD" VALUE="true">
    <PARAM NAME="-PRODUCT_VERSION" VALUE="4.1">
    <PARAM NAME="-LAF_MANAGER" VALUE="com.mitra.exhibclient.Web1000LAFMgr">
    <PARAM NAME="CACHE_ARCHIVE" VALUE="ImportIzmComJni.jar,exhibit.jar,base.jar,icons.jar,lr.jar">
    <PARAM NAME="-LISTEN_PORT" VALUE="80">
    <PARAM NAME="scriptable" VALUE="false">
    <PARAM NAME="-SHOW_PROXY" VALUE="true">
    <PARAM NAME="CACHE_OPTION" VALUE="Plugin">
    <PARAM NAME="-SSL_PORT" VALUE="443">
    <PARAM NAME="-LOGON_BKCOLOR" VALUE="167,42,72">
    <PARAM NAME="-PRODUCT_NAME" VALUE="WEB1000">
    <PARAM NAME="-LOGO" VALUE="/icons/logo.gif">
    <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4.1_01">
    <PARAM NAME="-PRODUCT_NAME_LOGO" VALUE="/icons/product.gif">
    <PARAM NAME="-WAVELET_SERVLET_PORT" VALUE="80">
    <PARAM NAME="-ICON_PATH" VALUE="/icons/small/">
    <PARAM NAME="-SSL_ENABLE" VALUE="FALSE">
    <PARAM NAME="-MAC_JRE_VERSION" VALUE="1.3.1">
    <PARAM NAME="-LOG" VALUE="ERROR">
    <PARAM NAME="-SHOW_TEST_PATTERN" VALUE="true">
    You do not have the Java Plug-In installed.<BR>
    Please Download and install Plug-In.
    </OBJECT>

  • Applet reload problem

    How can one ensure that an applet re-initialise itself when returning to the applet's page after leaving to other pages.
    I can only force to reload by pressing ctrl and refresh botton on the browser. Is there any tricks that can bypass this procedure and reload the applet automatically when one re-enter the applet's page?
    Thanks for any great suggestion.

    I think that JavaScript can be very useful if you wish to establish communication between your Applet and your browser.
    JavaScript -- > Java communication does not require the use of any particular API
    You just neet to clearly specify the name of your applet like this :
    (I prefer to use OBJECT tag than APPLET... is more generic)
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="myApplet" width="230" height="360" align="baseline">
    <PARAM name="code" value="myApplet.class">
    <PARAM name="type" value="application/x-java-applet">
    <PARAM name="scriptable" value="true">
    </OBJECT>Check out the scriptable parameter. This is required for Java --> JavaScript communication.
    Now, let's say you want a call a method called setMyAppletName that you have implemented in your applet, you would call it from a JavaScript function like this :
    function callJavaMethod(){
    document.myApplet.setMyAppletName("myApplet");
    }Notice that parameter name in your tag insertion tags should match the name of the applet you're tring to acces in the JavaScript function.
    Java -- > JavaScript communication it's a bit more complicated. It requires the use of netscape libraries that you can find in the following path of your Netscape install :
    [your Program Files directory ]\Netscape\Communicator\Program\java\classes
    There you will need a jar file called java40.jar (this is what I have with Netscape 4.7) where netscape packages are found. After having isntalled this jar in my package directory, this is how I refer to API
    import netscape.javascript.*;
    //Reference to browser window where current applet is embedded
    JSObject jsoWindow = JSObject.getWindow(this);
    //Preparing parameters to be sent to a JavaScript function that is going to be called
    String strHelloMsg = "Hello";
    //Parameters neet to be stored in a String array in order to be passed to JavaScript function
    String[] strArrParams = {strHelloMsg };
    //Init JavaScript function name to be called
    String strFunctionName = "showMessage"
    //Call JavaScript function
    _jsoWindow.call(strFunctionName, strArrParams);In your HTML page you could define such function like this :
    <script>
        function showMessage(strMsg){
                alert(strMsg);      
    </script>That's all the help I can give since I don't know how JavaScript browser events work. You should find it out in the huge amounts of JavaScript tutorial and reference sites.
    Good luck !
    Diego

  • Applet Reloading problem

    Hi,
    I am involved in a project in which we are using many images to scroll in a applet.The url of the images are retiriving from the data base and given to the applet using jsp.The problem is when the page is reloaded it takes much time to show the applet again even i am using the archive tag.Can any one tell me how to get rid of this reloading problem.
    Regards,
    Prakash

    Hi,
    Thanks for the reply.Actually i am not reloading the page.when i go to some other page and comes back it takes a long time ro load the page.Is there any way to overcome this problem.
    Regards,
    Prakash

  • Problem on Applet - Reloading with eixsting Components

    Hi All,
    I have developed one application for chatting purpose.. I have embeted with JSP. that application contains Login/logout based.. suppose if i try to login two windows in sample browser am getting previouse window applet components with current applet window.
    plz give me some tips..
    Thanks and regards

    hi
    Actually in my application it has 3 buttons.. if am try to login in same application in same browser. it will show 3x2 = 6 buttons.. how to remove the existing components.. am using single tone pattern..

  • Applet reloading twice

    I'm running an applet in a side frame in Netscape 4.04 browser. When I kick the HTML page off with the browser closed, the applet appears to start twice, with both running concurrently. This causes it to fall over because both try to write to the same file at the same time.
    When I open the browser first and then open the HTML page it loads normally.
    Does anyone know why, or has anyone experienced this problem? I'm using JRE 1.2.2.

    Thanks for the help. If anyone's interested:
    Two applets started after double-clicking under Communicator under Windows
    Description: Double-clicking an HTML file to start Communicator and load JET 3270 under Windows results in two JET 3270 applets running.
    Cause: The default "open" action performed by Windows when opening an HTML file when Communicator is the default browser passes the file both as a command line argument and as a DDE message. Because of this Communicator loads the HTML page twice, resulting in two JET 3270 applets.
    Corrective Action:
    Edit the default open action so that it does not use DDE using the following instructions. Start Windows Explorer. From the View menu select Options. Select the File Types tab. Find Netscape Hypertext Document in the list of registered file types, select it and click Edit. Select the open action and click Edit. Remove the tick from the Use DDE checkbox. Click OK, Close and Close.

  • Not getting swing components when the applet reloads

    I am facing one problem that is related to reloading of swing components. I Have a JPanel inside JApplet which contains some swing components and a button to launch the same JPanel again in the JApplet. When I click on the button the JPanel should get added in the JApplet once again below the upper JPanel. But new JPanel is not getting displayed although the reference of the new JPanel is created.

    My guess is that you haven't added your swing components to the right place. Are you adding them to the contentpane?

  • Netscape Window Resize/Applet Reload Problem

    Is there anyway to keep a java applet from restarting when a Netscape window is resized? This problem doesn't happen in IE.

    In my case, someone told me to eliminate in applet's HTML this directives:
    <META HTTP-EQUIV="Pragma" CONTENT="No-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <META HTTP-EQUIV="Cache-Control" CONTENT="must-revalidate">
    <META HTTP-EQUIV="Cache-Control" CONTENT="mag-age=0">
    Further, to set in Preferences/Advanced/Cache the option "Once per session" for "Document in cache is compared to document to network"
    Believe me, in my case, it's worked with no aditional changes in the original applet's code. (Don't thank to me, my chilean friend Christian was the magician).

  • Applet reloads (applet newbie)

    Hi all.
    I've got a problem with an applet i'm developing. I try to show a line chart representing values where each point is associated with an image. This is contained within a JPanel and at the same time the JPanel is within a JApplet. The source of the problen is that when the explorer loads the applet, everything is ok but the images that doesn't appear anywhere. I've got two buttons for the user to be able to move from point to point of the chart and, when i click on one of them, the images happens to appear suddenly.
    I've tried to refresh the applet just at the end of the init() method using the repaint() method but with no success.
    For more info, the applet should run over jre1.4.0 and i'm using MSIE 6.0 because of the specifications of the project.
    Any help would be appreciated.
    Thanks.

    Hi all again. If anyone has read the question thanks. But i have found a solution (don't know if the better one) to the problem i had. I've learned about the MediaTracker class and i've used it to keep track on the images loaded and waiting until all of them have been loaded.
    Thanks again.

Maybe you are looking for

  • Disabling 'Change' and 'Delete' button in Attachment List in ME52N

    Hi Friends, The reuqirement is this: A user attaches doucments  ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N). Now when any user goes to see the docuemnts attached to the PR, he

  • Character Encoding in C++

    We work under WinNT(SP4) with MS DevStudio 6.0. We take the DOM-class from ORACLE. What can I do to encoding Character ? I put line <?xml version="1.0" encoding="ISO-8859-2"?> in the XML-Header, but the oracle-parser say 'LPX-00201'. I also test XMLS

  • Could Bad RAM Cause Video Problems in 1st Gen 24" iMac

    I have been having video problems with my 1st Gen 24" iMac over the past 6 months, but recently the machine wouldn't turn on at all. I left it at my local Apple Store to be diagnosed and they said that it was just a bad stick of RAM (not a big deal,

  • Vendor  extended  to Comp code

    Hi experts, What is meant by extending a vendor from one comp code to another  company code? How can we do that in PO?  Please tell me the steps. Thanks Dan

  • No "ANGLE" Option for Linear Gradients in Motion 4!

    Referring to the help section for Motion 4, there should be an "angle" tool for linear gradients, but there's not! I have a linear gradient that runs top to bottom and I want it to run left to right. Is there any other way to do this without having t