在网上查找实现模态frame的例子,例子源码中有这样一个方法,请问这是什么意思,能不能帮忙解答一下。
// when the reflection calls in this method has to be
// replaced once Sun provides a public API to pump events.
public void start() throws Exception {
Class clazz = Class.forName("java.awt.Conditional");
Object conditional = Proxy.newProxyInstance(clazz.getClassLoader(),
new Class[] {clazz}, this);
Method pumpMethod = Class.forName("java.awt.EventDispatchThread")
.getDeclaredMethod("pumpEvents", new Class[] {clazz});
pumpMethod.setAccessible(true);
pumpMethod.invoke(Thread.currentThread(), new Object[] {conditional});
}
// when the reflection calls in this method has to be
// replaced once Sun provides a public API to pump events.
public void start() throws Exception {
Class clazz = Class.forName("java.awt.Conditional");
Object conditional = Proxy.newProxyInstance(clazz.getClassLoader(),
new Class[] {clazz}, this);
Method pumpMethod = Class.forName("java.awt.EventDispatchThread")
.getDeclaredMethod("pumpEvents", new Class[] {clazz});
pumpMethod.setAccessible(true);
pumpMethod.invoke(Thread.currentThread(), new Object[] {conditional});
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货