该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
哪位高手帮小妹看看哈;谢谢啦,代码如下
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import chrriis.common.UIUtils;
import chrriis.dj.nativeswing.swtimpl.NativeInterface;
import chrriis.dj.nativeswing.swtimpl.components.JFlashPlayer; public class Example extends JPanel {
int i;
Example(int i) {
super(new BorderLayout());
this.i=i;
JFlashPlayer flashPlayer = new JFlashPlayer();
flashPlayer.load(getClass(), "4-"+i+".swf");
add(flashPlayer, BorderLayout.CENTER);
UIUtils.setPreferredLookAndFeel();
NativeInterface.open();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
}
});
NativeInterface.runEventPump();
}
}
报错是:Exception in thread "pool-1-thread-1" java.lang.IllegalStateException: runEventPump was already called and can only be called once (the first call should be at the end of the main method)!
at chrriis.dj.nativeswing.swtimpl.NativeInterface.runEventPump(NativeInterface.java:381)
at Example.(Example.java:29)