September 2005
Beginner
576 pages
13h 6m
English
| Q1: | Does a threaded animation program have to use Thread.sleep() to pause, or can you omit it to produce the fastest possible animation? |
| A1: | You have to put some kind of pause in place in an animation program, or the program will crash or behave erratically. Without pauses, Java won't be able to keep up with constant repaint() requests and may be unable to respond to mouse-clicks on its interface and other user input. Part of the process of animation design in Java is finding the right display speed that all environments can handle. |
| Q2: | What happens if you draw something, such as an image, to coordinates that aren't within the window? |
| A2: | Methods that draw something to a coordinate will continue to draw it even if none of it is visible within ... |
Read now
Unlock full access