有没有办法获得我们以这种方式声明的属性值?
JButton button = new javax.swing.JButton(){
public int value=0;
}
button.addActionListener(listener);
//in action listener
public void ActionPerformed(ActionEvent evt){
JButton btn = (JButton)evt.getSource();
btn.value =2; //error
}