import java.awt.*;
import java.applet.Applet;
public class jessie04 extends Applet
{
private Container container;
private GridBagLayout layout;
private GridBagConstraints constraints;
private String lastCommand;private boolean start;
public Label lad;
public TextField txt;
public Button bon1,bon2,bon3,bon4,bon5,bon6,bon7,bon8,bon9,bon10,bon11,bon12,bon13,bon14,bon15,bon16;
public Panel p1,p2,p;
public void init()
{
p1=new Panel(new GridLayout(4,4,16,16));
bon1=new Button("1");
bon2=new Button("2");
bon3=new Button("3");
bon4=new Button("4");
bon5=new Button("5");
bon6=new Button("6");
bon7=new Button("7");
bon8=new Button("8");
bon9=new Button("9");
bon10=new Button("c");
bon11=new Button("=");
bon12=new Button("0");
bon13=new Button("+");
bon14=new Button("-");
bon15=new Button("/");
bon16=new Button("*");
p1.add(bon1);p1.add(bon2);p1.add(bon3);p1.add(bon10);
p1.add(bon4);p1.add(bon5);p1.add(bon6);p1.add(bon11);
p1.add(bon7);p1.add(bon8);p1.add(bon9);p1.add(bon12);
p1.add(bon13);p1.add(bon14);p1.add(bon15);p1.add(bon16);
p2=new Panel(new FlowLayout(FlowLayout.CENTER));
lad=new Label("结果");
txt=new TextField(20);
p2.add(lad);p2.add(txt);
p=new Panel(new GridLayout(2,1,10,10));
p.add(p1);p.add(p2);
add(p);
}
}
要加什么才能真正的能计算,我新人没分给大家,大家帮个忙