package wangwang2;
import javax.swing.*;
import java.awt.*;
import java.awt.font.ImageGraphicAttribute;
public class TXZ2 {
public static void main(String[] args){
Jframe gameframe = new Jframe();
gameframe.setTitle("推箱子");
gameframe.setSize(22*48+10,12*48+38);
gameframe.setBounds((1920-800)/2,(1080-600)/2,800,600);
gameframe.setLocation(null);
gameframe.setResizable(false);
gameframe.setDefaultCloseOperation(3);
JPanel panel= new JPanel();
panel.setBackground(Color.GRAY);
panel.setLayout(null);
gameframe.setContentPane(panel);
ImageIcon boxImg = new ImageIcon("");
JLabel box = new JLabel(boxImg);
panel.add(box);
box.setBounds(3*48,3*48,48,48);
ImageIcon workerImg = new ImageIcon("");
JLabel worker = new JLabel(workerImg);
worker.setBounds(17*48,6*48,48,48);
ImageIcon goalImg = new ImageIcon("");
JLabel goal = new JLabel(goalImg);
panel.add(goal);
goal.setBounds(8*48,9*48,48,48);
ImageIcon wallImg = new ImageIcon("");
JLabel[]walls = new JLabel[22*2+(12-2)*2];
for(int i=0,i