本系列使用Intellij IDEA 2017.3.4版本
一、运行窗体
1.
2.
3.
4.
5.
6.
给JPanel起个名字 -如From
7.
8.
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
得到一个尚无任何控件的界面