For the first part of your question, there are a few approaches. You could make a call to JavaScript and remove/re-add the applet from there. Use LiveConnect to call from Java to JS, and be sure to use the "MAYSCRIPT" attribute in your applet tag.
In your JavaScript method, remove the applet from the DOM and add a fresh one in its place.
You might also put the applet in an iFrame, which gives you more options.
But what is your aim in reloading the applet? It would be a safer approach to solve this problem completely within the applet instead of relying on JavaScript (and your JAR will likely be cached anyway, so you're basically just restarting the same applet).
I suggest either:
- code your applet so that you can reset its GUI and data with a method call, or
- run the applet via a small wrapper applet which can drop/recreate the real applet it is displaying.
For the wrapper applet approach: implement AppletStub, instantiate the real applet, and display it as the center of a BorderLayout, something like this (in your start() method):
Applet applet = new TheRealApplet();
applet.setStub(this);
this.setLayout( new BorderLayout() );
add( applet, BorderLayout.CENTER );
applet.init();
applet.start();
...then call applet.stop() in the wrapper's stop() method, and add a new method that restarts the applet -- by stopping it, removing it from the layout, and adding a fresh instance.