zoukankan      html  css  js  c++  java
  • 个人信息显示

     package 个人信息;
    import java.awt.*;
    public class 个人信息 extends Frame
    {
     public 个人信息()       //导入AWT包
    {
     super("我的信息");           //窗口标题
        this.setSize(280,300);    //组件尺寸
        this.setLocation(300, 240);  //组件的显示位置
        this.setBackground(Color.green);  //组件的背景颜色
        this.setLayout(new FlowLayout());   //容器为流布局,居中
        this.add(new Label("姓名"));          //标签,添加到框架上
        this.add(new TextField("卓摸卟透",20));   //文本行,20列
        this.add(new Label("性别"));
        this.add(new TextField("男",20));
        this.add(new Label("籍贯"));
        this.add(new TextField("召唤师峡谷",20));
        this.add(new Label("班级"));
        this.add(new TextField("RNG",20));
        this.add(new Label("兴趣"));
        this.add(new TextField("打游戏",20));
        this.add(new Button("确认"));          //创建按钮
        this.add(new Button("返回"));
        this.setVisible(true);           //显示框架窗口,必须在添加组件后
    }
    public static void main (String arg[]){ new 个人信息();}
  • 相关阅读:
    【解题报告】2019正睿Day2
    如何卡SPFA
    【游记】2019国庆清北刷题营
    CF427D Match & Catch
    P2178 [NOI2015] 品酒大会
    Loj#6071. 「2017 山东一轮集训 Day5」字符串
    SP8093 JZPGYZ
    P3346 [ZJOI2015]诸神眷顾的幻想乡
    CF1037H Security
    CF932F Escape Through Leaf
  • 原文地址:https://www.cnblogs.com/zw98916/p/9135736.html
Copyright © 2011-2022 走看看