The BasicPump design

  • Tuttle graphics involve considering a small creature crawling around the surface of the drawing area.

  • The Graphics class provides the facilities for drawing upon a Component window or an Image, collectively known as drawables.

  • Colors can be defined as 32 bit ARGB values.

  • Drawings should always be made in terms of a virtual space and mapped to the physical space when they are rendered onto the drawable.

  • The Component update() method first clears the drawable and then calls the paint() method. This will cause a visible image to flicker and the update() method should be overridden to avoid this.

  • Image processing can be accomplished by copying an Image to an integer array, processing the contents of the array and then creating a new Image from the array.

Exercises for Chapter 4

4.5 The TuttleTest demonstration class




A Java GUI programmer's primer
Java GUI Programmers Primer, A
ISBN: 0139088490
EAN: 2147483647
Year: 1998
Pages: 85
Authors: Fintan Culwin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net