请教一个关于jbuilder的自动生成的代码的作用?

fxstiandi 2004-11-20 09:25:23
//Construct the frame
public MainFrame() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}

enableEvents(AWTEvent.WINDOW_EVENT_MASK);
是做什么用的呢?
谢谢.
...全文
72 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
icy_csdn 2004-11-22
  • 打赏
  • 举报
回复
java.awt.Component
enableEvents(long eventsToEnable)


Enables the events defined by the specified event mask parameter to be delivered to this component.
Event types are automatically enabled when a listener for that event type is added to the component.

This method only needs to be invoked by subclasses of Component which desire to have the specified event types delivered to processEvent regardless of whether or not a listener is registered.


redex 2004-11-21
  • 打赏
  • 举报
回复
看看这个“enableEvents”调用了哪些函数,就知道它是做什么用的了

50,503

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧