如图,请用代码写出来:

代码登场:
public class CalacTest extends Frame {
public static void main(String[] args) {
new CalacTest("加法计算器");
}
private CalacTest(String name){
setTitle(name);
setLayout(new FlowLayout());
setLocation(400,400);
TextField one=new TextField(10);
TextField two=new TextField(10);
TextField three=new TextField(10);
Label l=new Label("+");
Button b=new Button("=");
b.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
int on1 = Integer.parseInt(one.getText());
int on2 = Integer.parseInt(two.getText());
three.setText(""+(on1+on2));
}
});
add(one);
add(l);
add(two);
add(b);
add(three);
setVisible(true);
pack();
windowClose();
}
private void windowClose() {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}
结果图:如本题题目。
人生甚是短暂,为有今天感恩,且行且珍惜,愿你打破自我的牢笼…