CS 117 Animation Lab

Today you are going to experiment with primitive Java animation. Begin by saving, compiling and running the code in Disk.java and DiskMain.java. together with a new "double-buffered" version of the Canvas class: DBCanvas.java. The DBCanvas class changes the way you draw into a canvas slightly in that objects like rectangles, ovals, etc. are all drawn before the method showBuffer() is called. This allows for smooth movement.

Follow the moving disk and follow the code to see if you understand what is happening. Once you do, modify the code in several different ways: