首页 > 其他 > 详细

个人简历

时间:2018-06-05 21:41:53      阅读:224      评论:0      收藏:0      [点我收藏+]

import javax.swing.*;

 

import java.awt.*;

 

import java.awt.event.*;

 

public class Myself extends Frame

 

{

 

     JButton Exit;

 

    public Myself()

 

    {

 

        super("myself");

 

        setSize(250,300);

 

        this.setLocation(300, 240);

 

        this.setBackground(Color.green);

 

        this.setLayout(new FlowLayout());

 

        this.add(new Label("name"));

 

        this.add(new TextField("哆啦",25));

 

        this.add(new Label("Stud_Number"));

 

        this.add(new TextField("19903311098",25));

 

        this.add(new Label("sex"));

 

        this.add(new TextField("woman",25));

 

        this.add(new Label("political status"));

 

        this.add(new TextField("Legue member",25));

 

        Exit=new JButton("EXIT");

 

        this.add(Exit);

 

        this.addWindowListener(new WinClose());

 

        this.setVisible(true);

 

    }

 

    public static void main(String[] args) {

 

        new Myself(); //实例化

 

    }

 

}

 

class WinClose implements WindowListener

 

{

 

    public void windowClosing(WindowEvent ev)

 

    {

 

        ev.getWindow().dispose();

 

    } //关闭窗口方法

 

    public void windowOpened(WindowEvent ev) {}

 

    public void windowClosed(WindowEvent ev) {}

 

 

 

    public void windowIconified(WindowEvent ev) {}

 

 

 

    public void windowDeiconified(WindowEvent ev) {}

 

 

 

    public void windowActivated(WindowEvent ev) {}

 

 

 

    public void windowDeactivated(WindowEvent ev) {}

 

 

 

}

个人简历

原文:https://www.cnblogs.com/zm7844/p/9142032.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!