码迷,mamicode.com
首页 > 其他好文 > 详细

个人简历

时间:2018-06-05 21:47:49      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:cti   public   rgs   visible   jbutton   ica   mys   listen   ack   

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) {}

 

 

 

}

个人简历

标签:cti   public   rgs   visible   jbutton   ica   mys   listen   ack   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!