急 谁能帮我DEBUG1个JAVA程序 谢谢

来源:百度知道 编辑:UC知道 时间:2024/05/01 17:02:09
急 谁能帮我DEBUG1个JAVA程序 谢谢
QQ 细说..我是JAVA 菜鸟
关于ACTIONLISTENER的
QQ: 506278732
谢谢了

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

public class WelcomeApplet extends JApplet implements ActionListener{
JTextField welcomeField;
public void init(){
Container container = getContentPane();
container.setLayout(new FlowLayout());

welcomeField = new JTextField("请按下按钮");
container.add(welcomeField);

JButton button = new JButton("确定");
button.addActionListener(this);
container.add(button);
}
public void actionPerformed(ActionEvent arg0) {
welcomeField.setText("欢迎进入Java世界");
}
}

这个是按下按钮出现字的