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?
  1. In an off-screen double-buffering area

  2. The exact center of the window

  3. The upper-left corner of the applet window

2:What thing did you not learn during this hour?
  1. How to load images in an application

  2. How to make sure an image is not displayed until it loads

  3. Why the tennis ball is bouncing off thin air instead of the ground in the BouncePanel application.

3:In a threaded animation applet, where should you handle most of the movement of an image?
  1. The run() method

  2. The init() method

  3. The paint() method

Answers

A1: c. The x value increases as you head to the right, and the y value increases as you head ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.