求用过native swing的大神帮忙
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JFrame;
import chrriis.common.UIUtils;
import chrriis.dj.nativeswing.swtimpl.NativeInterface;
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
public class SwingHello extends JFrame{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* @param args
*/
static Container c;
public static void main(String[] args) {
UIUtils.setPreferredLookAndFeel();
NativeInterface.open();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame frame = new JFrame("法务通");
frame.setUndecorated(true);// 禁用此窗体的装饰
frame.setLocationRelativeTo(null);//居中显示
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(getGUI(), BorderLayout.CENTER);
frame.setSize(938, 614);
frame.setLocationByPlatform(true);
frame.setVisible(true);
}
});
NativeInterface.runEventPump();
}
public static JScrollPane getGUI(){
JScrollPane webBrowserPanel = new JScrollPane();
webBrowserPanel.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
final JWebBrowser webBrowser = new JWebBrowser();
webBrowser.setBarsVisible(false);
webBrowser.navigate("table.html");
webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
return webBrowserPanel;
}
}
报错:
Exception in thread "main" java.lang.IllegalStateException: The version of SWT that is required is 3.5M6 or later!
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:149)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:182)
at SwingHello.main(SwingHello.java:30)