私はスウィングアプリケーションでchrriis.dj.nativeswing.swtimpl.components.JWebBrowserを使用してjupyter-notebookのWebページを開きます。今私の問題は、新しい - > Python 3ボタンJWebBrowserを新しいファイルにクリックすると、常に404ページを返します。DJNativeSwing JWebBrowserをjupyterノートブックのブラウザとして使用するにはどうすればよいですか?
New a notebook in DJNativeSwing JWebBrowser
DJNativeSwing JWebBrowser got the 404 page
私は多分それは誰も私がjupyterノートの下DJNativeSwing JWebBrowserの仕事を作るのを助けることができ、jupyter・ノートではJavaScript APIを実行していなかったと思いますか?
私が使用したコード:
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingUtilities;
import chrriis.common.UIUtils;
import chrriis.dj.nativeswing.swtimpl.NativeInterface;
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowserWindow;
import chrriis.dj.nativeswing.swtimpl.components.WebBrowserAdapter;
import chrriis.dj.nativeswing.swtimpl.components.WebBrowserNavigationEvent;
import chrriis.dj.nativeswing.swtimpl.components.WebBrowserWindowFactory;
import chrriis.dj.nativeswing.swtimpl.components.WebBrowserWindowWillOpenEvent;
/**
* @author Christopher Deckers
*/
public class NavigationControl extends JPanel {
protected static final String LS = System.getProperty("line.separator");
public NavigationControl() {
super(new BorderLayout());
final JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
final JWebBrowser webBrowser = new JWebBrowser();
webBrowser.setBarsVisible(false);
webBrowser.setStatusBarVisible(true);
webBrowser.navigate("https://try.jupyter.org/");
tabbedPane.addTab("Controled Browser", webBrowser);
add(tabbedPane, BorderLayout.CENTER);
}
/* Standard main method to try that test as a standalone application. */
public static void main(String[] args) {
UIUtils.setPreferredLookAndFeel();
NativeInterface.open();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame frame = new JFrame("DJ Native Swing Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new NavigationControl(), BorderLayout.CENTER);
frame.setSize(800, 600);
frame.setLocationByPlatform(true);
frame.setVisible(true);
}
});
NativeInterface.runEventPump();
}
}
jwebbrowserがどのエンジンを使用しているのかわかりませんが、Jupyterにはかなり最新のWebブラウザが必要です.Jupyterが必要とするものをサポートしていない可能性もあります。 –
Javaアプリケーションはwindows8.1の下で走った、私はそれがIE11を使用すると思います。 –