Multi-Threaded Graphics (Alternative Approaches)

1. Redraw everything in paint.

This is simple and easy, but if things change quickly it is slow and can result in a flickering display.

2. Implement the dynamic part as a separate Component.

This is relatively easy and eliminates the flickering problem, but requires a null layout manager and can be quite slow.

3. Have routines other than paint directly do drawing operations.

This is easy, efficient, and flicker-free, but results in “transient” drawing that is lost next time the screen is redrawn.

4. Override update and have paint do incremental updating

This eliminates the flicker and improves efficiency somewhat, but requires the graphics to be non-overlapping.

5. Double buffering.

This is the most efficient option, and has no problem with overlapping graphics. However, it is more complex and requires additional memory resources.

© 1996-2000 Marty Hall, 1999-2000 Lawrence M. Brown