diff --git a/GameFrame.java b/GameFrame.java new file mode 100644 index 0000000..feccaf9 --- /dev/null +++ b/GameFrame.java @@ -0,0 +1,17 @@ +package main; + +import javax.swing.*; +import java.awt.*; + +/* 窗体类*/ +public class GameFrame extends JFrame { + public GameFrame(){ + setTitle("五子棋");//设置标题 + setSize(620,670); + //setVisible(true);//设置显示窗体 + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// 关闭后退 + setLocationRelativeTo(null);//居中 + //不变窗口 + getContentPane().setBackground(new Color(209,146,17)); + } +}