

具体代码如下:
package saolei;
import java.awt.Color;
import java.awt.Container;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.*;
public class saolei implements ActionListener {
JFrame frame=new JFrame("扫雷小游戏");
JButton reset=new JButton("重来");
Container container=new Container();
final int row=20;
final int col=20;
final int leiCount=30;
JButton [][] buttons=new JButton[row][col];
int [][] counts=new int[row][col];
final int LEICODE=10;
public saolei(){
frame.setSize(1000, 800);
frame.setResizable(true);
frame.setDefaultCloseOperation