Suppose you a hmtl file called test.htm with an applet. You can use applet to call a javascript function in test.htm
My example show you to use java to a javascript function to open a new window. You may use javascript to reload a html page within a frame.
***test.htm
<html>
<head>
<script lang="JavaScript">
function myopen()
{
window.open("test.htm"

}
</script>
</head>
<applet code=JSPopup width=300 height=300>
<PARAM NAME="MAYSCRIPT" VALUE="TRUE">
</applet>
</html>
//JSPopup.java
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import netscape.javascript.*;
public class JSPopup extends Applet {
public void init() {
final TextArea ta = new TextArea();
Button button = new Button("Launch"

;
ActionListener listener =
new ActionListener() {
public void actionPerformed(ActionEvent e) {
/*
String htmlText = ta.getText();
JSObject topWindow =
JSObject.getWindow(JSPopup.this);
Object args[] = new Object[3];
args[2] = "width=300,height=300," +
"location=0,menubar=0,status=0,toolbar=0";
JSObject popupWindow =
(JSObject)topWindow.call("open", args);
JSObject document = (JSObject)
popupWindow.getMember("document"

;
args = new Object[] {htmlText};
document.call("write", args);
*/
JSObject jsobject = JSObject.getWindow(JSPopup.this);
Object args[] ={ "" };
jsobject.call ("myopen", args);
}
};
button.addActionListener(listener);
setLayout(new BorderLayout());
add(ta, BorderLayout.CENTER);
add(button, BorderLayout.SOUTH);
}
}
You will need JSobject from
The following links show you how to use JSobject
To load page with javascript
Please give me credit if you think this reply is useful.