Java Example Program / Sample Source Code
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;
public class RemoveFlashing extends Applet {
Image buffer;
Graphics bufferG;
public void init() {
buffer = createImage(this.getWidth(), this.getHeight());
bufferG = buffer.getGraphics();
}
public void paint(Graphics g) {
// rename the g to bufferG
g.drawImage(buffer, 0, 0, this);
}
public void update(Graphics g) {
paint(g);
}
} |
|
|