Java Graphics Programming Library: Concepts to Source Code / Edition 1

Hardcover (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Hardcover)
  • All (10) from $1.99   
  • New (2) from $59.50   
  • Used (8) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2014

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2014

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by


Java Graphics Programming Library is a comprehensive reference for the experienced Java developer, providing hundreds of pages of source code for fully functional Java graphics classes. This book/CD-ROM package saves valuable programming time by offering ready-to-use, customizable code for commonly used graphics, including a variety of polygons, polyhedra, ellipses, cones, cylinders, and more. Each chapter contains a thematic selection of graphics and covers the necessary mathematics, programming concepts, and source code for each image. At the end of each chapter are thumbnails of the graphics in the chapter and the additional graphics available on the companion CD-ROM. Both advanced and less experienced users will find an abundance of code they can use ?as is,? customize, or extend to suit a variety of programming needs.
Read More Show Less

Editorial Reviews

From The Critics
Intended for use by the experienced Java developer, this reference contains source code for Java graphics and animation. Polyglons, polyhedra, ellipses, cones, and cylinders are represented. Chapters cover the mathematics, programming concepts, and source code for each image. The companion CD-ROM contains source code, images, color samples of all the graphics used in the book, and Sun's Java 2 Software Development Kit. Campesato is a software developer. Annotation c. Book News, Inc., Portland, OR (
Read More Show Less

Product Details

  • ISBN-13: 9781584500926
  • Publisher: Cengage Learning
  • Publication date: 3/1/2002
  • Series: Charles River Media Programming Series
  • Edition description: 1ST
  • Edition number: 1
  • Pages: 550
  • Product dimensions: 6.14 (w) x 9.28 (h) x 1.21 (d)

Meet the Author

Oswald Campesato (Cupertino, CA) is an independent consultant who specializes in Perl, Java, and Web application development in conjunction with Open Source projects. He is the author of Java Graphics Programming Library: Concepts to Source Code.

Read More Show Less

Table of Contents

Acknowledgments xv
Introduction xvii
The Goal xvii
Why Buy This Book? xvii
What Does This Book Cover? xviii
What Has Been Omitted from This Book? xviii
Which Version of Java Is Required? xix
How Difficult Is the Code? xix
Are There Any Prerequisites? xix
Is This Book for Me? xix
Where to Get Ideas xx
Code Portability xx
What Graphics Capability Is Available in Java? xxi
Graphics Versus Code xxi
Why So Much Code? xxii
1 Colors and Basic Shapes 1
Overview 1
Concept: The Java Coordinate System 1
Concept: Drawing Lines to Render Rectangles 2
Concept: Using drawRect() to Render Rectangles 4
Concept: Colors and Their Components 6
Concept: Standard Colors 6
Concept: Rectangles and Gradient Shading 7
Concept: Rectangles as Polygons 9
Concept: Shaded Rectangles 11
Concept: Parallelograms as Polygons 13
CD Library 17
Summary 17
2 Building Blocks 19
Overview 19
Concept: Building Blocks 20
Concept: Triangles as Building Blocks 20
Concept: Parallelograms as Building Blocks 25
Concept: Oscillating Polyhedra 30
Concept: Ellipses as Core Building Blocks 37
Concept: Ellipses as Building Blocks for Cylinders 39
CD Library 45
Summary 46
3 Line Segments and Trigonometry (I) 47
Overview 47
Concept: Drawing Line Segments and Conchoids 48
Concept: Line Segments and Nephroids 52
Concept: Tilting Line Segments and Lissajous Curves 56
Concept: Line Segments and Hypocycloids 61
CD Library 65
Summary 66
4 Line Segments and Trigonometry (II) 67
Overview 67
Concept: Oscillating Line Segments and Folium Curves 67
Concept: Variable-Length Oscillating Line Segments and Folium Curves 71
Concept: Oscillating Line Segments and Tschirnhaus Curves 76
Concept: Gradient Oscillating Line Segments and Tschirnhaus Curves 80
Concept: Striped Oscillating Line Segments and Tschirnhaus Curves 85
CD Library 91
Summary 93
5 Rectangles and Trigonometry 95
Overview 95
Concept: Rectangles and Deltoids 95
Concept: Rectangles and Epicycloids 99
Concept: Rectangles and Oscillating Epicycloids 103
Concept: Rectangles and Hypocycloids 107
Concept: Rectangles and Oscillating Hypocycloids 112
Concept: Rectangles and Multi Polar Loops 116
CD Library 120
Summary 121
6 Polynomials and Line Segments 123
Overview 123
Concept: Computing Polynomial Values 123
Concept: Polynomials and Line Segments 124
Concept: Polynomials and Striped Line Segments 129
Concept: Multiple Polynomials and Line Segments 135
Concept: Multiple Polynomials and Striped Line Segments 139
CD Library 145
Summary 146
7 Polygons and 3D Polar Coordinates 147
Overview 147
Concept: Mapping 3D Points to a 2D Coordinate System 147
Concept: Polygons and 3D Polar Coordinates 148
Concept: Polygons and Cylinders 152
Concept: Gradient Polygons and Partial Cylinders 156
Concept: Gradient Polygons and Cylinders 160
Concept: Polygons and Distended Cylinders 164
Concept: Polygons and Multi-Colored Distended Cylinders 169
CD Library 173
Summary 174
8 Ellipse-Based Objects 175
Overview 175
Concept: Drawing an Ellipse 175
Concept: Drawing Ellipses with Shading 175
Concept: Drawing Ellipses Using Line Segments 178
Concept: Ellipses with Gradient and Diagonal Shading 179
Concept: Drawing Shrinking Ellipses 182
Concept: Drawing Organ Pipes 186
Concept: Drawing a Rotated Ellipse 189
CD Library 193
Summary 194
9 Ellipses and Simple Shading 195
Overview 195
Concept: Drawing Ellipses with Horizontal Stripes 195
Concept: Drawing Nested Ellipses with a Common End Point 198
Concept: Drawing Nested Ellipses in Rectangles 201
Concept: Drawing Gradient Ellipses 204
Concept: Drawing Hollow Ellipses 207
CD Library 211
Summary 211
10 Ellipses, Shading, and Simple Motion 213
Overview 213
Concept: Drawing Elliptic Pillars with Venetian Shading 213
Concept: Drawing Overlapping Elliptic Pillars with Venetian Shading 217
Concept: Drawing Shifting Ellipses and Wire Frames 221
Concept: Drawing Oscillating Shifting Ellipses and Wire Frames 225
CD Library 229
Summary 230
11 Ellipses and Basic Animation 231
Overview 231
Concept: Drawing Wind Chimes with Ellipses 231
Concept: Drawing Chains with Ellipses 238
Concept: Drawing Pulleys with Ellipses 244
Concept: Drawing Curling Sheets of Paper 253
CD Library 263
Summary 263
12 Spinning Objects with Lines and Elliptic Arcs 265
Overview 265
Concept: Drawing Spinning Cones with Elliptic Wedges 265
Concept: Drawing Spinning Cone-Like Objects with Elliptic Arcs 271
Concept: Drawing Spinning Horizontal Cones 277
Concept: Drawing Rotating Elliptic Bowls with Elliptic Wedges 283
Concept: Drawing Rotating Elliptic Bowls with Elliptic Arcs 288
CD Library 296
Summary 298
13 Ellipses and Cubic Functions 299
Overview 299
Concept: Drawing Horizontal Elliptic Sectors with Cubic Functions 299
Concept: Drawing Spinning Horizontal Elliptic Sectors with Cubic Functions 303
Concept: Drawing Contra-Spinning Horizontal Elliptic Sectors with Cubic Functions 308
Concept: Drawing Oscillating Horizontal Elliptic Sector Wire Frames with Cubic Functions 314
Concept: Drawing Bands of Horizontal Oscillating Elliptic Sector Wire Frames with Cubic Functions 319
CD Library 324
Summary 325
14 Ellipses and Lava-Like Patterns 327
Overview 327
Concept: Drawing Oscillating Elliptic Patterns 327
Concept: Drawing Elliptic Lava 332
Concept: Elliptic Lava and Colors 336
Concept: Elliptic Flow Lava and Colors 341
CD Library 346
Summary 348
15 Striated Ellipses and Arcs 349
Overview 349
Concept: Drawing Cones with Elliptic Arcs 349
Concept: Drawing Cones with Swirling Elliptic Swaths 352
Concept: Drawing Swirling Cones with Elliptic Arcs and Venetian Shading 356
Concept: Drawing Swirling Cones with Multi-Colored Elliptic Arcs 360
Concept: Drawing Swirling Cones with Elliptic Arcs 364
CD Library 369
Summary 370
16 Checkerboard Patterns 371
Overview 371
Concept: Drawing Checkerboard Patterns 371
Concept: Drawing 3D Checkerboard Patterns 374
Concept: Drawing a Checkerboard of Gradient Cells 376
Concept: Drawing Vertical Blinds 379
Concept: Drawing a Checkerboard Grid Pattern 382
CD Library 386
Summary 388
17 Recursion 389
Overview 389
Concept: Fibonacci Numbers 390
Concept: Drawing Lines via Recursion 390
Concept: Drawing Lines via Recursion to Create Tree-Like Patterns 393
Concept: Drawing Lines via Recursion to Create Tendril-Like Patterns 397
Concept: Drawing Squares via Recursion 401
Concept: Drawing Triangles via Recursion 406
Concept: Drawing Hexagons via Recursion 412
CD Library 418
Summary 420
18 Circles and Common Objects 421
Overview 421
Concept: Drawing Clock-Like Images 421
Concept: Drawing 3D Traffic Lights 428
Concept: Drawing Iron Gates 431
Concept: Drawing Umbrellas 437
CD Library 442
Summary 442
19 Loading Images 443
Overview 443
Concept: Displaying a GIF File 443
Concept: Displaying Multiple GIF Files 445
Concept: Displaying Grids of GIF Files 447
Concept: Displaying Patterns of GIF Files 450
Concept: Resizing and Displaying GIF Files 453
Concept: Displaying GIF Files as Connected Circles 455
Concept: Displaying Digital Dates with GIF Files 462
CD Library 469
Summary 470
20 Miscellaneous Graphics 471
Overview 471
CommonObjects Folder 471
Flags Folder 473
Miscellaneous Folder 474
PlayingCards Folder 474
PolarEquations Folder 474
Astroids Folder 475
PseudoFractals Folder 475
Stripes Folder 476
Appendix A Essential Mathematical Concepts 477
Overview 477
Scale Factors 478
Essential Trigonometry 478
The Pythagorean Theorem 480
Slopes of Line Segments 482
Trigonometric Identities 482
Additional Formulas 483
Radians 483
Converting between Radians and Degrees 484
Circles and Ellipses 484
Polar Coordinates 487
Polar Coordinates to Cartesian 487
Cartesian to Polar Coordinates 488
Polygons 488
Rotating Points in the Plane 489
Mapping (x, y, z) Points to (X, Y) Values 489
Appendix B Java Essentials 491
Overview 491
Terminology in This Book 491
Reference Points 492
Rectangles 492
Ellipses 492
Polygons 492
Double Buffering 493
Miscellaneous 493
Bar Graphs 495
Coding Style 495
Defining Java Classes 496
Compiling Java Classes 497
Template for Java Classes 498
Fast Redrawing via Double Buffering 500
Overview of AWT Drawing Methods 500
Ellipses 500
Arcs 501
Circles and Semi-Circles 501
Lines 501
Rectangles 502
Polygons 502
Overview of Shading Techniques 503
Wire Frames 505
Dithering 506
Summary 506
Appendix C About the CD-ROM 507
CD Folders 507
System Requirements 508
Installation 509
Index 511
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)