📄 gamehall.java
字号:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
/**
* @author yeeku.H.lee kongyeeku@163.com
* @version 1.0
* <br>Copyright (C), 2005-2008, yeeku.H.Lee
* <br>This program is protected by copyright laws.
* <br>Program Name:
* <br>Date:
*/
public class GameHall extends JFrame
{
private InfoSave infoSave;
ChatSystem chatSystem = new ChatSystem();
HallPanel hallPanel = new HallPanel(25 , 5);
private JSplitPane split;
private JScrollPane scroll;
public void init(InfoSave infoSave)
{
this.infoSave = infoSave;
chatSystem.setInfoSave(infoSave);
chatSystem.init();
hallPanel.setInfoSave(infoSave);
scroll = new JScrollPane(hallPanel);
split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
split.setLeftComponent(scroll);
split.setRightComponent(chatSystem);
scroll.setMinimumSize(new Dimension(703, 600));
this.add(split);
this.setPreferredSize(new Dimension(1021, 737));
this.pack();
this.setResizable(false);
//设置窗台在屏幕中心显示
this.setLocationRelativeTo(null);
//设置按关闭窗体时退出程序,默认只是隐藏窗体
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setTitle("五子棋游戏大厅");
this.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -