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
Which list does not allow duplicates in java?
What method is used to specify a container's layout in java programming?
What are some characteristics of interference class?
What is the purpose of javac exe?
What is volatile keyword in java
what are the methods in object?
How does enum work in java?
What is the static method?
What are the differences between string and stringbuffer?
If try block is successfully executed, Then Is Finally block executed?
What is the static block?
Is it possible for yielded thread to get chance for its execution again ?
What are basic data types?
What are anonymous inner classes?
What is variable explain?