parent
911a34d811
commit
e69d992c95
@ -1,19 +1,23 @@
|
|||||||
package main;
|
package wuziqiyem;
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
/* 窗体类*/
|
import javax.swing.*;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 游戏窗体类
|
||||||
|
*/
|
||||||
public class GameFrame extends JFrame {
|
public class GameFrame extends JFrame {
|
||||||
public GameFrame(){
|
public GameFrame() {
|
||||||
setTitle("五子棋");//设置标题
|
setTitle("五子棋");//设置标题
|
||||||
setSize(620,670);
|
setSize(880, 670);//设定尺寸
|
||||||
//setVisible(true);//设置显示窗体
|
getContentPane().setBackground(new Color(209, 146, 17));//添加背景色
|
||||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// 关闭后退
|
setLayout(new BorderLayout());
|
||||||
setLocationRelativeTo(null);//居中
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//点击关闭按钮是关闭程序
|
||||||
//不变窗口
|
setLocationRelativeTo(null); //设置居中
|
||||||
getContentPane().setBackground(new Color(209,146,17));
|
setResizable(false); //不允许修改界面大小
|
||||||
JPanel rightBlankPanel = new GameTimeyzm();
|
|
||||||
|
JPanel rightBlankPanel = new GameTimeyzm();
|
||||||
add(rightBlankPanel, BorderLayout.EAST);
|
add(rightBlankPanel, BorderLayout.EAST);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue