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

    package 个人信息;
    import java.awt.*;
    public class 秋池 extends Frame
    {
     public 秋池()       //导入AWT包
    {
     super("我的信息");           //窗口标题
        this.setSize(280,300);    //组件尺寸
        this.setLocation(300, 240);  //组件的显示位置
        this.setBackground(Color.gray);  //组件的背景颜色
        this.setLayout(new FlowLayout());   //容器为流布局,居中
        this.add(new Label("姓名"));          //标签,添加到框架上
        this.add(new TextField("奈何",20));   //文本行,20列
        this.add(new Label("学号"));
        this.add(new TextField("20163311105",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("计算机科学与技术(师范班)",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 秋池();}
    }

  • 相关阅读:
    使用nodeJs安装Vue-cli
    Win10 下安装 NodeJS
    sublime Text 3 字体
    使用THINKPHP中的控制器和模块查询数据库
    Windows下PHP开发环境搭建
    在HTML中使用JS
    Python 网络编程介绍
    python 单例模式
    Python 元类
    Python 异常处理
  • 原文地址:https://www.cnblogs.com/hjza/p/9135014.html
Copyright © 2011-2022 走看看