flash播放器,关于remove组建的问题。。
播放flash是这样创建播放器
NativeInterface.open();
UIUtils.setPreferredLookAndFeel();
JFlashPlayer player = new JFlashPlayer();
....
关闭flash时,关闭掉flash同时还要remove掉加载播放器的panel
NativeInterface.close();
.....remove(flashPanel);
..现在问题是,程序中有其他地方要保持NativeInterface.open();
所以,在关闭flash的时候不能调用 NativeInterface.close();
,此时flash也能关掉,但是
double t1 = system.currentTimeMills();
remove(flashPanel);
double t2 = system.currentTimeMills();
t1 = t2 - t1;
system.out.println(t1);
测试结果,remove耗时将近10s..严重影响了性能,求大神解释一下原因,提供一个解决方法。
谢了!!