龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > JAVA开发 >

java基于swing实现的连连看代码(8)

时间:2014-11-14 11:08来源:网络整理 作者:网络 点击:
分享到:
public void actionPerformed(ActionEvent e) { if (e.getSource() == newlyButton) { int grid[][] = new int[8][7]; this.grid = grid; randomBuild(); mainFrame.setVisible(false); pressInformation = false; i

        public void actionPerformed(ActionEvent e) {
                if (e.getSource() == newlyButton) {
                        int grid[][] = new int[8][7];
                        this.grid = grid;
                        randomBuild();
                        mainFrame.setVisible(false);
                        pressInformation = false;
                        init();
                }
                if (e.getSource() == exitButton)
                        System.exit(0);
                if (e.getSource() == resetButton)
                        reload();
                for (int cols = 0; cols < 6; cols++) {
                        for (int rows = 0; rows < 5; rows++) {
                                if (e.getSource() == diamondsButton[cols][rows])
                                        estimateEven(cols + 1, rows + 1, diamondsButton[cols][rows]);
                        }
                }
        }

精彩图集

赞助商链接