java Swing 练习

import javax.swing.JFrame; 

public class Swingtest {
    static final int WIDTH = 500;
    static final int HEIGHT = 500;
    public static void main(String[] args){
        JFrame jf = new JFrame("hello,Swinghahahahahah !");
        jf.setSize(WIDTH,HEIGHT);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jf.setVisible(true);
    }
}

运行后出现的是一个提示框,提示框的边框上写着

"hello,Swinghahahahahah !"
posted @ 2017-03-12 16:05  cheney-yang  阅读(341)  评论(0编辑  收藏  举报