Java 2D Graphics
Creating High Quality Graphics & Text
Publisher: O'Reilly Media
Final Release Date: May 1999
Pages: 368

One weakness of Java has been its graphics capabilities. Java 1.0 and 1.1 only included simple primitives for line drawing: lines could only be one pixel wide, they could only be solid, and there wasn't any good way to draw curves. Font management and color management were also weak. Java 2D (collectively called the "2D API") signals a major improvement in Java's graphics capabilities. It covers many of the classes in Java 1.2 that address graphics handling and improves on many weaknesses that were present in the previous versions of Java.The 2D API allows you to produce high-quality, professional images on a screen or printer. Java 2D Graphics describes the 2D API from top to bottom, demonstrating how to set line styles and pattern fills as well as more advanced techniques of image processing and font handling. You'll see how to create and manipulate the three types of graphics objects: shapes, text, and images. Other topics include image data storage, color management, font glyphs, and printing.Java 2D Graphics assumes no prior knowledge of graphics. Chock full of detailed explanations and examples, this book provides beginning Java programmers with a solid foundation in 2D graphics and helps more advanced programmers create and use high-quality images in their applications.Topics covered in the book include:

  • The rendering pipeline
  • Shapes and paths
  • Geometry
  • Painting with solid colors, gradients, and textures
  • Stroking paths, including dashed lines
  • Transformations: translation, rotation, shearing, and scaling
  • Alpha compositing
  • Clipping
  • Rasterizing and antialiasing
  • Fonts and text
  • Font metrics
  • Glyphs
  • Colors and color spaces
  • sRGB and CIEXYZ
  • ICC color profiles
  • Images, image color models, and image data
  • Image processing
  • Image data storage
  • Graphics devices
  • Printing
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillyJava 2D Graphics

(based on 4 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 4 customers

Displaying reviews 1-4

Back to top

(1 of 1 customers found this review helpful)


Relevant in 2014

By reviewer

from Texas

About Me Developer


  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written


    Best Uses

    • Intermediate
    • Novice
    • Student

    Comments about oreilly Java 2D Graphics:

    Past reviewers trash the book as being outdated and as having too few examples. Beginning from the first chapter to the last, you need not look far for useful, reusable code. It may seem trivial now (not) to integrate an arbitrary graphics canvas along with Swing, but this book shows you concisely and pedagogically.

    You will learn some graphics tricks too, like looping over shapes while cycling colors, gradient rectangles and "photo editing"-type filters. The author takes great pains to use Rectangle2D and to modularize his methods. This is received gratefully.

    This is a great reference and self-study text. If you are interested in bridging the gap between college-level/intermediate Java and games, this book lets you elevate your apps beyond simple forms.

    The length of the book is perfect. The author exhaustively mentions important, useful methods. Examples are relevant - they might as well be features in any graphics app worth writing.

    (1 of 3 customers found this review helpful)


    Java 2D Graphics Review

    By John

    from Undisclosed

    Comments about oreilly Java 2D Graphics:

    Good book, and was very relevant two years ago, but has lost its impact. With Java moving forward, this book really needs a new, updated edition that covers Swing components as well as other projects such as SVG/Batik.

    (1 of 2 customers found this review helpful)


    Java 2D Graphics Review

    By Harry

    from Undisclosed

    Comments about oreilly Java 2D Graphics:

    If one needs to understand text fairly well an approach to consider is reading books such as Java Swing, Swing, and the text and related parts of Java 2D Graphics so as to approach the topic from 2 opposite directions. I feel comfortable with that approach after not being able to get to sufficient depth with the former books (although what they present is also essential to know). Though providing depth, Java 2D Graphics makes the subject fairly simple and clear.

    A newer addition that integrates Swing fully into the examples would be nice. This edition probably was written when both Swing and 2D Graphics were not yet completed as are most books on new computer subjects. That is understandable.

    (4 of 4 customers found this review helpful)


    Java 2D Graphics Review

    By tom

    from Undisclosed

    Comments about oreilly Java 2D Graphics:

    absolutely useless! far too few examples and the examples are all too big. also there little discussion on what goes on in the java 2d api and too many function descriptions - THIS IS WHAT THE JAVA DOCS ARE FOR -.

    Displaying reviews 1-4

    Back to top

    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?
    Print:  $39.95
    The shipment of this item may be delayed.