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); }
String htmlText = ta.getText(); JSObject topWindow = JSObject.getWindow(AppletJavaScript.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); }
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);}