?? gamepanel.java
字號(hào):
/* * GamePanel.java * * Created on April 20, 2005, 6:58 PM */package minegame;import java.awt.*;import java.awt.event.*;import javax.swing.*;/** * * @author hysun */public class GamePanel extends JComponent implements ActionListener, MouseListener { private FieldCell[][] cells; public static final Color ACTIVE_COLOR = Color.blue.darker(); public static final Color VICTORY_COLOR = Color.green.darker(); public static final Color OVER_COLOR = Color.red.darker(); private JButton newButton; private JLabel statusLabel1, statusLabel2; private JPanel statusBar,panel; private ConfigDialog cdialog; private JFrame frame; private JMenuBar mainMenu; private JMenu gameMenu, helpMenu; private JMenuItem setting ,newGame, topHelp, aboutGame,exit; private JTextArea help; private JScrollPane scrollHelp; private int mineNum; private int r, c; private int w, h; private int flagNum, revealNum, totalNum; private static boolean gameActive ; public GamePanel() { statusBar = new JPanel(); panel = new JPanel(); panel.setLayout(new BorderLayout()); statusBar.setLayout(new FlowLayout(FlowLayout.CENTER)); ImageIcon img = new ImageIcon(this.getClass().getResource("29.gif")); newButton = new JButton(img); newButton.setPreferredSize(new Dimension(23, 23)); statusLabel1 = new JLabel(); statusLabel2 = new JLabel(); statusBar.add(statusLabel1); statusBar.add(newButton); newButton.addActionListener(this); statusBar.add(statusLabel2); mainMenu = new JMenuBar(); gameMenu = new JMenu("村欄(G)"); helpMenu = new JMenu("弧
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -