【发布时间】:2011-03-30 18:12:11
【问题描述】:
可以像下面的代码示例那样设置操作吗?是否有任何可能由此引起的垃圾收集问题?如果不是,最好的方法是什么?
btnAwesomeButton=new JButton(new AbstractAction("Awesome Button") {
@Override
public void actionPerformed(ActionEvent arg0) {
//Do stuff here
//Refer to the components on parent windows through ParentWindowClass.this.componentName
}
});
【问题讨论】: