用户图形设计界面之信息登记

import java.awt.*;
public class loginframe extends Frame {
public loginframe()
{
 super("user login");
 this.setSize(1000, 1000);
 this.setLocation(300, 240);
 this.setBackground(Color.black);
 this.setLayout(new FlowLayout());
 
 
 this.add(new Label("name:weixiao"));
 this.add(new TextField("name:weixiao",10));
 this.add(new Label("sex:f"));
 this.add(new TextField("sex:f",10));
 this.add(new Label("学号 20163311124"));
 this.add(new TextField("学号 20163311124",30));
 this.add(new Label("联系方式:5888888"));
 this.add(new TextField("联系方式:5888888",30));
 this.add(new Label("地址:河南"));
 this.add(new TextField("地址:河南",10));

 this.add(new Button("ok"));
 this.add(new Button("cancle"));
 this.setVisible(true);
 
}
public static void main(String arg[])
{
 new loginframe();
}
}

猜你喜欢

转载自www.cnblogs.com/wjsh/p/9141949.html