Repaint() doesn't clear the frame

前端 未结 3 410
故里飘歌
故里飘歌 2020-12-19 18:45
public class Graphics2DTest extends JPanel implements ActionListener{
private Timer time = new Timer(5,(ActionListener) this);
int x = 0,y = 0;
public void paintComp         


        
3条回答
  •  情歌与酒
    2020-12-19 18:53

    You need to clear the background first.

    A resource is this:

    http://java.sun.com/products/jfc/tsc/articles/painting/

提交回复
热议问题