该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
import java.awt.*;
public class AWT extends Frame{
Panel p1,p2,p3,p4,p5,p6,p7;
Button star,stop;
TextField t1,t2,t3,t4,t5,t6;
Label l1,l2,l3;
void Init(){
p1=new Panel();
p1=new Panel();
p1=new Panel();
p1=new Panel();
p1=new Panel();
p1=new Panel();
star=new Button("开始");
stop=new Button("停止");
t1=new TextField(16);
t2=new TextField(16);
t3=new TextField(16);
t4=new TextField(16);
t5=new TextField(16);
t6=new TextField(16);
l1=new Label("姓名");
l2=new Label("攻击");
l3=new Label("防御");
}
void Set(){
p1.setLayout(new GridLayout(3,3));
p1.add(t1);
p1.add(l1);
p1.add(t2);
p1.add(t3);
p1.add(l2);
p1.add(t4);
p1.add(t5);
p1.add(l3);
p1.add(t6);
p2.add(star);
p2.add(stop);
p3.add(new TextArea());
p4.add(p1);
p4.add(p2);
this.setLayout(new GridLayout(1,2));
this.add(p4);
this.add(p3);
this.setVisible(true);
this.setBounds(300, 300, 300, 300);
}
public static void main(String[] args){
AWT a=new AWT();
}
}