public Mine2()
    {
        super("踩地雷");
        setSize(frameWidth, frameHeight);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        
        setLayout(new BorderLayout());
        
        gameMessage = new JLabel("遊戲進行中");//訊息顯示 
        
        add(gameMessage, BorderLayout.NORTH);
        
        centerButtonPanel = new JPanel();
        centerButtonPanel.setLayout(new GridLayout(mapHeight, mapWidth));
        buttons = new JButton[mapHeight][mapWidth];
        
        //按鈕
        for(int i=0; i<mapHeight; i++)
            for(int j=0; j<mapWidth; j++)
            {
                buttons[i][j] = new JButton();
                buttons[i][j].addActionListener(this);
                buttons[i][j].setBackground(Color.WHITE);
                buttons[i][j].setActionCommand(i+" "+j);
                centerButtonPanel.add(buttons[i][j]);
            }
        
        add(centerButtonPanel, BorderLayout.CENTER);
        
        JButton re = new JButton("重玩");
        re.setActionCommand("regame");
        re.addActionListener(this);
        
        add(re, BorderLayout.SOUTH);
        
        gameRunning = false;
    }