Is this not valid?
public class LayerItem extends JLabel{
public LayerItem(){
this.addActionListener(new java.awt.event.ActionListener(){
@Override
public void actionPerformed(java.awt.event.ActionEvent evt){
}
});
}
}
I get an error on line 3 saying: cannot find symbol: method addActionListener(<anonymous ActionListener>)
The method addActionListener
is not available for JLabel
components.