Answer Posted / m!r@
Double Buffering
sample code of java to reduce flinking :
public void update(Graphics g) {
Graphics offgc;
Image offscreen = null;
Dimension d = size();
offscreen = createImage(d.width, d.height);
offgc = offscreen.getGraphics();
offgc.setColor(getBackground());
offgc.fillRect(0, 0, d.width, d.height);
offgc.setColor(getForeground());
paint(offgc);
g.drawImage(offscreen, 0, 0, this);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can a singleton class be inherited?
Can an object subclass another object?
What is the difference between and ?
Is null a string in java?
What is the difference between iterator and enumeration ?
Explain about interrupt() method of thread class ?
What two classes are used to read data only?
What is the difference between a factory and abstract factory pattern?
How do you square a number in java?
What is the internal implementation of set in java?
What is increment in java?
What is temp in java?
What are the types of relation?
How do you sort arrays in java?
Explain when noclassdeffounderror will be raised ?