阅读下列程序,请写出程序的运行结果。import java.applet.*;import javax.swing.*;import java
阅读下列程序,请写出程序的运行结果。
import java.applet.*;
import javax.swing.*;
import java.awt.event.*;
public class C extends Applet implements ActionListener
{
int n=0;
JButton button;
public void init()
{
setSize(400,100);
button=new JButton("");
add(button);
button.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
n++;
button.setText(n+"");
}
}