双缓冲,我记得有两种方法,一种是两个图象,一个前台Graphics,一个后台Graphics,画图时在后台画,画好了,再用前台的Graphics画后台Graphics的图片。另一种是有两个或多个图象,不分前后台,显示一个图象时,另外的在画,图象循环使用(c语言时用过)。
         给出第一种的java实现
         a、  定义后台图象BufferedImage offScreenImg=offScreenImg = new BufferedImage(this.maxX, this.maxY,
                                     BufferedImage.TYPE_INT_RGB);
         b、  得到后台的Graphics实例
    Graphics2D offScreenG;
        offScreenG = offScreenImg.createGraphics();
         c、  覆盖paintComponent方法
     public void paintComponent(Graphics g) {
          super.paintComponent(g);
        g.drawImage(offScreenImg, 0, 0, this.maxX, this.maxY, this);
          }
        绘制时用后台Graphics,绘制好后,调用repaint(),将offScreenImg绘到面板上。