这无效吗?
public class LayerItem extends JLabel{
public LayerItem(){
this.addActionListener(new java.awt.event.ActionListener(){
@Override
public void actionPerformed(java.awt.event.ActionEvent evt){
}
});
}
}
我在第 3 行收到一条错误消息:cannot find symbol: method addActionListener(<anonymous ActionListener>)