[问答题] 下面的程序中,有两个文本框,Input和Output,用户在Input文本框中输入字符串后回车,字符串会在Output文本框中出现。
import java.awt.*;
import java.awt.event.*;
public class java2 extends Frame
public static void main(String args[])
java2 f=new java2("java2");
Panel pan=new Panel();
f.init();
public java2(String str)
super(str);
public void init()
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)(
System.exit(0);
;
setSize(200,200);
setLayout(new FlowLayout());
final TextField tf1=new TextField(20);
final TextField tf2=new TextField(20);
final Label la1=new Label("Input:");
final Label la2=new Label("Output:");
tf1.addAetionListener(______)
public void actionPerformed(ActionEvent e)
tf2.