HTMLページを表示するための簡単なJAVAプログラムを作成しました。しかし、htmlページのJAVASCRIPTをプログラムで動作させることができないようです。私はそれを使って計算をします。ブラウザでHTMLページを開くと、機能します。誰かが私のJAVAプログラムでそれを機能させる方法を手伝ってもらえますか?
以下にコードがあります。
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication16;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import java.io.FileReader;
/**
*
* @author chris
*/
public class JavaApplication16 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception {
String url = "http://members.multimania.nl/c75/";
JEditorPane editor = new JEditorPane("http://members.multimania.nl/c75/");
editor.setEditable(true);
JScrollPane pane = new JScrollPane(editor);
JFrame f = new JFrame("calculatie Program");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(pane);
f.setSize(800, 600);
f.setVisible(true);
}
}