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(){
//1、设置窗口
frame.setSize(1000, 800);
frame.setResizable(true);
//是否可改变窗口大小
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
//2、添加重来按钮
addResetButton();
//添加按钮
addButtons();
//埋雷
addLei();
//添加雷的计算
calcNeiboLei();
frame.set