本版等级:
本版专家分:0
结帖率:0%得分:0 回复于: 2014-06-12 11:36:48
好像说用双缓冲技术,不好使啊,不太会用
/**双缓冲画布*/
private Image memoryImage;
/**双缓冲画笔*/
private Graphics memoryGraphics;
//重新开辟一块内存区域,用于存放叠加后的图片
this.memoryImage = this.createImage(900,700);
//从双缓冲画布当中得到双缓冲画笔,这样通过双缓冲画笔绘制的图片就会叠加在双缓冲画布中
this.memoryGraphics = this.memoryImage.getGraphics();
//绘制文字
this.memoryGraphics.drawString("分数:"+pointer, 100, 57);
//绘制图片
this.memoryGraphics.drawImage(hartNumImg,50,80,30,25,this);