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

    package 关;
    import java.awt.*;
    public class jextends Frame

    {
     public j()       //导入AWT包
    {
     super("我的信息");           //窗口标题
        this.setSize(250,200);    //组件尺寸
        this.setLocation(300, 240);  //组件的显示位置
        this.setBackground(Color.gray);  //组件的背景颜色
        this.setLayout(new FlowLayout());   //容器为流布局,居中
        this.add(new Label("姓名"));          //标签,添加到框架上
        this.add(new TextField("花落",18));   //文本行长度18
        this.add(new Label("学号"));
        this.add(new TextField("20163311127",18));
        this.add(new Label("性别"));
        this.add(new TextField("男",18));
        this.add(new Label("籍贯"));
        this.add(new TextField("西安市户县",18));
        this.add(new Label("班级"));
        this.add(new TextField("计算机科学与技术(师范班)",18));
        this.add(new Label("兴趣"));
        this.add(new TextField("发呆,睡觉",18));
        this.add(new Button("确认"));          //创建按钮
        this.add(new Button("返回"));
        this.setVisible(true);           //显示框架窗口,必须在添加组件后
    }
    public static void main (String arg[]){ new j();}
    }

  • 相关阅读:
    CodeForces
    CodeForces-1253B(贪心+模拟)
    WebFlux、Reactive编程特性
    redis-on-windows配置解释
    SpringBoot配置方式补充
    如何在 Ubuntu 20.04 上安装 Python Pip
    MySQL之1055错误
    CuckooSandbox
    Manjaro 20.0.1 Lysia 安装Googlepinyin
    Manjaro 20.0.1 Lysia 更新国内镜像源
  • 原文地址:https://www.cnblogs.com/maskman/p/9135806.html
Copyright © 2011-2022 走看看