import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
import javax.swing.*;
import java.awt.*;
class JavaxBrowerExample {
public static void main(String[] args) {
Browser browser = new Browser();
BrowserView view = new BrowserView(browser);
JFrame frame = new JFrame("JxBrowser Google Maps");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.add(view, BorderLayout.CENTER);
frame.setSize(700, 500);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
browser.loadURL("http://maps.google.com");
}
}
答案 0 :(得分:0)
您需要jxbrowser jar添加到库中的NetBeans。请参阅此页面中的步骤3“添加所需的库”:
https://jxbrowser.support.teamdev.com/support/solutions/articles/9000012871-jxbrowser-in-netbeans