十一周课程总结
九宫格
实验过程
1、实验代码
package Work7;
import javax.swing.*;
import java.awt.*;
public class Test {
public static void main(String[] args) {
JFrame frame=new JFrame("九宫格");
frame.setLayout(new GridLayout(3,3,3,3));
Button but=null;
for(int i=1;i<=9;i++) {
but=new Button(""+i);
frame.add(but);
}
frame.pack();
frame.setVisible(true);
}
}
2、实验结果
3、实验总结
九宫格是运用了表格布局管理器,只是需要简单的创建一个表格布局管理器就行了,还算比较简单。
##课程总结
###图形界面

####ATM


但是ATM的局限性就是只能在Windows系统才能使用
####SWING

####基本容器:Jframe容器
1、Jframe常用方法

2、Dimension类

3、Piont类

####标签组件:JLable类

1、常用方法

2、更改文字样式

3、设置图片

####按钮组件:JButton类
1、常用方法

###布局管理器
五种常用管理器
1、FlowLayout流式管理器
2、BorderLayout窗口管理器
3、GirdLayout表格管理器
4、CardLayout卡片管理器
5、绝对定位
####FlowLayout流式管理器
常用方法

####BorderLayout窗口管理器
常用方法

####GirdLayout表格管理器
常用方法

####CardLayout卡片管理器
常用方法

####绝对定位
常用方法
