日期:2014-05-20 浏览次数:20968 次
public void paint(Graphics g) {
// super.paint(g);
Image tmp = new BufferedImage(this.getWidth(), this.getHeight(), BufferedImage.TYPE_INT_RGB);
tmp.getGraphics().drawImage(img, imagePoint.x, imagePoint.y, null);
g.drawImage(tmp, 0, 0, null);
}
------解决方案--------------------
这个对Swing和Java2D来说,很容易实现。