btn = new Button("log");
btn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
}
});
请问e表示什么 ,传入actionPerformed 里能访问什么东西?
btn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
}
});
请问e表示什么 ,传入actionPerformed 里能访问什么东西?
比如从e里面获得点击的JButton的实例:
JButton btn = (JButton)e.getSource();