/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* LucasGameTest.java
*
* Created on 20.3.2012, 7:17:36
*/
package cv4;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
/**
*
* @author Matej
*/
public class LucasGameTest extends javax.swing.JFrame {
/** Creates new form LucasGameTest */
public LucasGameTest() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
Okframe = new javax.swing.JDialog();
Oklabel = new javax.swing.JLabel();
Oktext = new javax.swing.JTextField();
Okbutton = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
ResetButton = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
Game = new cv4.LucasGameView();
jMenuBar1 = new javax.swing.JMenuBar();
Menu = new javax.swing.JMenu();
Save = new javax.swing.JMenuItem();
Load = new javax.swing.JMenuItem();
NewGame = new javax.swing.JMenuItem();
Okframe.setTitle("FIGURKY");
Okframe.setMinimumSize(new java.awt.Dimension(150, 100));
Okframe.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
OkframeWindowClosing(evt);
}
});
Oklabel.setText("Zadaj pocet figurok");
Okbutton.setText("Hraj");
Okbutton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
OkbuttonActionPerformed(evt);
}
});
javax.swing.GroupLayout OkframeLayout = new javax.swing.GroupLayout(Okframe.getContentPane());
Okframe.getContentPane().setLayout(OkframeLayout);
OkframeLayout.setHorizontalGroup(
OkframeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(OkframeLayout.createSequentialGroup()
.addContainerGap()
.addGroup(OkframeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Oklabel, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)
.addGroup(OkframeLayout.createSequentialGroup()
.addComponent(Oktext, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Okbutton)))
.addContainerGap())
);
OkframeLayout.setVerticalGroup(
OkframeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(OkframeLayout.createSequentialGroup()
.addContainerGap()
.addComponent(Oklabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(OkframeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Oktext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Okbutton))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("LUCAS GAME");
setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setBackground(new java.awt.Color(255, 255, 0));
jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
ResetButton.setText("Reset");
ResetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ResetButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(373, Short.MAX_VALUE)
.addComponent(ResetButton)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(ResetButton)
.addContainerGap())
);
jPanel2.setBackground(new java.awt.Color(255, 255, 255));
Game.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
GameMouseReleased(evt);
}
});
javax.swing.GroupLayout GameLayout = new javax.swing.GroupLayout(Game);
Game.setLayout(GameLayout);
GameLayout.setHorizontalGroup(
GameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 446, Short.MAX_VALUE)
);
GameLayout.setVerticalGroup(
GameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 50, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Game, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(Game, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
Menu.setText("HRA");
Save.setText("Save");
Save.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SaveActionPerformed(evt);
}
});
Menu.add(Save);
Load.setText("Load");
Load.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
LoadActionPerformed(evt);
}
});
Menu.add(Load);
NewGame.setText("New game");
NewGame.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
NewGameMouseReleased(evt);
}
});
NewGame.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
NewGameActionPerformed(evt);
}
});
Menu.add(NewGame);
jMenuBar1.add(Men
CV4.rar_logic
版权申诉
76 浏览量
2022-09-19
19:09:01
上传
评论
收藏 32KB RAR 举报
![avatar](https://profile-avatar.csdnimg.cn/36163497263541e6b6d5b627b1692a97_weixin_42653691.jpg!1)
朱moyimi
- 粉丝: 65
- 资源: 1万+
最新资源
- 基于MySQL的气象设备管管理,依托VB语言开发黄金
- 数据库管理工具:dbeaver-ce-23.1.1-macos-x86-64.dmg
- 数据库管理工具:dbeaver-ce-23.1.1-macos-aarch64.dmg
- 练功房角色小企鹅练功房角色小企鹅
- 数据库管理工具:dbeaver-ce-23.1.0-stable.x86-64.rpm
- 数据库管理工具:dbeaver-ce-23.1.0-macos-x86-64.dmg
- 数据库管理工具:dbeaver-ce-23.1.0-macos-aarch64.dmg
- 无人车的关键技术、行业发展趋势、以及基本代码
- 数据库管理工具:dbeaver-ce-23.0.5-stable.x86-64.rpm
- 国内移动端APP月活跃(MAU)Top5000 数据整理
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)