Quiz
Animate yourself as much as you can muster and answer the following questions to test your skills.
Questions
1: |
Where is the (0,0) coordinate on a container?
- In an off-screen double-buffering area
- The exact center of the window
- The upper-left corner of the applet window
|
2: |
What thing did you not learn during this hour?
- How to load images in an app
- How to make sure an image is not displayed until it loads
- Why the tennis ball is bouncing off thin air instead of the ground in the BouncePanel app.
|
3: |
In a threaded animation applet, where should you handle most of the movement of an image?
- The run() method
- The init() method
- The paint() method
|
Answers
A1: |
c. The x value increases as you head to the right, and the y value increases as you head downward.
|
A2: |
c. Would you believe clear-air turbulence?
|
A3: |
a. Some movement might be handled by statements in the paint() method, but most of it will take place in run() or a method called from within run().
|
|