import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class simpleEvent extends Applet implements ActionListener
{
/**
* @param args
*/
Label lb;
TextField in,out;
//public static void main(String[] args) {
// TODO Auto-generated method stub
public void init()
{
lb = new Label("请输入你的名字");
in = new TextField(6);
out = new TextField(20);
add(lb);
add(in);
add(out);
in.addActionListener(this);
}
@Override
public void actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
out.setText(in.getText()+"欢迎光临??");
}
}
simpleEvent
最新推荐文章于 2021-03-11 12:11:32 发布