求????按一个按钮把文本框的内容复制到标签中,
目的是:按一个按钮把文本框的内容复制到标签中,
import java.awt.*;
import Java.awt.event.*;
public class TestFrame implements ActionListener{
public static void main(String args[]){
Frame fr=new Frame("基本GUI");
fr.setLayout(new FlowLayout());
fr.setSize(400,200);
fr.pack();
fr.setVisible(true);
Label la=new Label("label");
fr.add(la);
TextField te=new TextField("textfield");
fr.add(te);
Button bu=new Button("button");
fr.add(bu);
bu.addActionListener(this);
}
public void actionPerformed(ActionEvent e){
te.setText=la.getText; /////////////////////此地方不知怎么做??????????
}
}