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
What is difference between wait and notify in java?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
What are the major drawbacks of external iteration?
In which language java is written?
Is nullpointerexception checked or unchecked?
Why do we create public static method in java?
What does function identity () do?
How do you allocate memory to object?
Is arraylist zero based?
What is the purpose of the main method?
What data type is string java?
If a variable is declared as private, where may the variable be accessed?
What are operators and its types?
What is java regex?
What is the final access modifier in java?