0
這是無效的嗎?在JLabel擴展類中找不到符號
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>)
哇,我現在覺得自己像個白癡。謝謝,我想'addMouseListener' –