(1)Swing建立窗体

本系列使用Intellij IDEA 2017.3.4版本java

1、运行窗体

1.ide

2.3d

3.blog

4.it

 

 

5.io

 

6.class

给JPanel起个名字 -如Fromimport

 7.im

 

8.d3

 

9.

生成

import javax.swing.*;

public class From {
    public static void main(String[] args) {
        JFrame frame = new JFrame("From");
        frame.setContentPane(new From().From);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }

    private JPanel From;
}

 

10.

11.

 

12.

 运行from

获得一个尚无任何控件的界面

 

2、设置窗体属性

相关文章
相关标签/搜索