setTitle 设置标题
setSize 设置大小
setLocationRelativeTo 设居中置
setDefaultCloseOperation 设置关闭窗体
setVisible 设置是否显示
setBackground 设置背景颜色
1、JFrame窗体基本属性设置:
标题、大小、默认关闭模式、居中、可见
2、JDialog窗体
提示对话框
----JOptionPane.showMessageDialog(null,String);
询问对话框
----JOptionPane.showConfirmDialog(null,String);
输入对话框
----JOptionPane.showInputDialog(null,String);
3、窗体基本控件:
3.1--容器 JPanel
3.2--按钮 JButton
3.3--标签 JLabel
3.4--文本框 JTextField
3.5--密码框 JPasswordField
3.6--单选框 JRadioButton && ButtonGroup
3.7--复选框 JCheckBox
3.8--下拉框 JComboBox
3.9--文本域 JTextArea
3.0--滚动面板 JScrollPane
3.1--文件选择器 JFileChooser
4.三种布局
4.1、流式布局【默认】-->FlowLayout
4.2、边框布局-->BorderLayout 设置方位
北:North 或者 BorderLayout.NORTH
南:South
西:West
东:East
中:Center
4.3、网格布局-->GridLayout(3,3) 设置行数和列数