public class A implements ActionListener
{
public A
{
private JFrame frame=new JFrame("A");
private JButton btn=new JButton();
btn.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==btn)
{
btn.setText("abc");
}
}
}
这段代码中btn.addActionListener(this);
this指的是哪个对象?是类A的对象?还是frame?