在netbeans 8.2中找不到'com.teamdev.jxbrowser.chromium.swing.BrowserView'包错误

时间:2019-02-01 20:03:25

标签: java swing

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");
    }
}

1 个答案:

答案 0 :(得分:0)

您需要jxbrowser jar添加到库中的NetBeans。请参阅此页面中的步骤3“添加所需的库”:

https://jxbrowser.support.teamdev.com/support/solutions/articles/9000012871-jxbrowser-in-netbeans