import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;
public class HitBrick extends JFrame implements KeyListener{
private BallThread greenBallThread;//控制小球的线程
private boolean xUp,yUp,bouncing;
private int x,y,xDx,yDy;//小球坐标,增量
private final int MAX_X=300,MAX_Y=500;
private boolean renew;
private JLabel label;
private int Rx,Ry;//横板坐标
private Brick brick[]=new Brick[18];//砖块
private Ball ball;//小球
public HitBrick(){
super("打砖块");
1