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 logical variable?
Tell me about different OOPS concepts.
How does arraylist work in java?
What are the important features of Java 9 release?
Which software is used for java programming?
What are the uses of synchronized keyword?
What is a databasemetadata?
Is java jre still free?
How to perform selection sort in java?
Can main() method in java can return any data?
How do I remove a character from a string in java?
Which package has light weight components in java programming?
Can a class have a static inner class?
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
what is the difference between process and thread? : Java thread