Have one to sell? Sell yours here
Graphic Java 1.2, Volume 1: AWT, Third Edition
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Graphic Java 1.2, Volume 1: AWT, Third Edition [Paperback]

David Geary (Author)
4.4 out of 5 stars  See all reviews (18 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more


Book Description

0130796662 978-0130796660 September 21, 1998 1st
Thousands of experienced Java developers are ready to move beyond the limits of the AWT -- to the supercharged GUI capabilities of the new Java Foundation Classes. This book shows them exactly how to make the transition -- slashing development time and building customizable, cross-platform Java applications. Graphic Java's detailed coverage begins with colors, fonts, images, image manipulation and printing. There is extensive new coverage of the inheritance-based and delegation-based event models; containers and layout managers. Understand each basic component of a Java-based GUI, as well as how to implement mouseless operation. Graphic Java also includes detailed coverage of advanced topics, including lightweight components, drag-and-drop, custom dialogs, the peerless scrolling framework, rubberbanding, double buffering and sprite animation. This is an ideal sourcebook and reference for all Java application programmers moving from the AWT to the JFC.


Editorial Reviews

Amazon.com Review

Java developers know that the Abstract Windowing Toolkit (AWT) is still an effective way to build functional user interfaces, whether inside Web browsers or in stand-alone applications. David Geary's guide to AWT programming in Graphic Java 1.2 shows you all the basics of AWT newly refitted for the new Java Developer's Kit (JDK) 1.2 standard from Sun, including some excellent 2-D animation examples.

After introducing the basics of the AWT library, the author looks at simple painting and 2-D graphics. Standout sections here look at displaying images--a staple of Internet programming--as well as transforming images with "filters" (such as dimming and rescaling an image). Graphic Java 1.2 shows you a variety of advanced techniques for getting control of your bit-mapped content. The tour of Java graphics capabilities moves on with coverage of layout managers and basic AWT components such as buttons, text fields, lists, and choices. For those who want to create stand-alone Java applications, there's much material on using Java menus.

The book's advanced material highlights new features of JDK 1.2, such as its support for lightweight controls, built-in double-buffering support, and advanced "native-style" operations (such as clipboard support and "rubber-banding" classes). The author also shows off his custom classes for 2-D sprite animation. --Richard Dragan

From the Author

Do You Need This Book If You're Using Swing?

If you're developing graphical user interfaces in Java, you are most likely using either AWT or Swing components. Obviously, if you're using AWT components, you'll want to consider this book. But what if you are using Swing?

A common misconception about Swing is that it is a replacement for the AWT. In actuality, although Swing components are replacements for the AWT components, Swing is built on the AWT. All Swing lightweight components are derived from the JComponent class, which in turn is derived from the AWT's Container class. So all Swing components are in fact AWT components.

Because Swing is built on the AWT, Swing developers need to have a basic grasp of AWT concepts. For example, Swing components use the delegation event model and are laid out by layout managers, both of which are implemented in the AWT.

In addition to covering fundamental AWT concepts, such as the delegation event model and layout managers, this book also discusses additional AWT topics such as: the Component class, graphics, colors and fonts, and image manipulation. Advanced topics, including data transfer and drag and drop, double buffering, rubber banding, and sprite animation are also discussed.

So, back to the original question: If you are using Swing, do you need this book? The answer is it depends on whether you have a basic understanding of fundamental AWT concepts, and whether you have need of advanced AWT topics. Also, the second volume of Graphic Java covers Swing exclusively; it does not discuss the AWT topics presented in this book. If you have the Swing volume of Graphic Java, and you need a better understanding of the AWT, this book is the perfect companion to the Swing volume. It should also be noted that only 150 pages of the AWT volume (out of 875 pages) are concerned with AWT components; more than 80% of this book is devoted to fundamental and advanced AWT concepts.

If you are new to building user interfaces in Java and are serious about Swing programming, you should consider both volumes of Graphic Java, which together provide more than 2500 pages of the most comprehensive coverage available on Swing and the AWT. If you're using Swing and are already familiar with the AWT, you can skip this volume and move on to the Swing volume of Graphic Java.

A Closer Look at Some of the Topics Covered in This Book:

The AWT Component Class:

A chapter is dedicated to the superclass of all AWT and Swing components: the Component class. Component properties are explored in addition to setting minimum, maximum, and preferred component sizes. Setting cursors for components, and the implementation of custom cursors are also discussed. The chapter concludes with discussions of component serialization and internationalization in addition to the relationship between components and JavaBeans.

Delegation Event Model:

The delegation event model is discussed in great detail in a chapter that is nearly 100 pages long. The chapter begins with an overview of event sources, event listeners and the event classes themselves. The two types of AWT events -- component and semantic -- are discussed in addition to event adapters and the use of inner classes for event handling. Next, custom events are explored, in addition to manually dispatching events to a component using the AWT event queue. The chapter concludes with a look at active events (new for the 1.2 JDK), the delegation event model's inheritance-based mechanism and a discussion on event handling design.

Layout Managers:

More than 100 pages are dedicated to layout managers. All of the standard AWT layout managers are discussed in detail, including nearly 30 pages devoted to the AWT's most powerful -- and most confusing -- layout manager, GridBagLayout. Other topics include forcing a container to layout its components, laying out components without using a layout manager, implementing custom layout managers, and using GridBagLayout with input forms.

Graphics, Colors, and Fonts:

Two chapters illustrate graphical operations and the use of colors and fonts. A discussion of the Graphics class includes a discussion of the component coordinate system, and when it is appropriate to copy and dispose of Graphics instances. Basic painting operations, such as painting and filling shapes are also discussed. The colors and fonts chapter provides an overview of color models, system colors, and fonts and font metrics.

Image Manipulation and Animation:

Three chapters are devoted to image manipulation. A chapter on loading and displaying images clearly presents the often confusing topic of image producers and image observers, in addition to using the MediaTracker class to asynchronously load images. The differences between using images in applets and applications is also explored, in addition to using animated GIFs and loading images as resources. The second chapter discusses image filtering in detail by presenting the implementation of a number of custom image filters. One of the most difficult aspects of image filtering, extending the ImageFilter class, is discussed in detail. The chapter concludes with sections on implementing the ImageConsumer interface and an introduction to double buffering. The third chapter discusses image manipulation without filtering by scaling and flipping images, and using the PixelGrabber and MemoryImageSource classes.

The final chapter in the book presents a custom animation package, which clearly illustrates the steps involved in implementing sprite animation. You will find this chapter useful if you need to develop animations that go beyond merely flipping through a stack of images.

Data Transfer and Drag And Drop:

Two chapters cover data transfer and drag and drop. The data transfer chapter illustrates copying data to, and retrieving data from, both local clipboards and the native clipboard. The rest of the chapter is concerned with the AWT's data transfer mechanism. The AWT only provides built-in support for transfering strings, so the chapter concludes with examples that illustrate how to transfer images and AWT components. The drag and drop chapter provides an overview of the java.awt.dnd package, and includes a simple recipe for implementing drag and drop. The chapter also discusses the differences between using inheritance vs. delegation when implementing drag and drop, and a section on the use of Java reflection to implement more general drag sources and drop targets.


Product Details

  • Paperback: 878 pages
  • Publisher: Prentice Hall PTR; 1st edition (September 21, 1998)
  • Language: English
  • ISBN-10: 0130796662
  • ISBN-13: 978-0130796660
  • Product Dimensions: 9.2 x 7 x 1.8 inches
  • Shipping Weight: 2.9 pounds
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (18 customer reviews)
  • Amazon Best Sellers Rank: #1,412,681 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

18 Reviews
5 star:
 (9)
4 star:
 (7)
3 star:
 (2)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (18 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

24 of 24 people found the following review helpful:
4.0 out of 5 stars The BEST book available on the AWT, October 19, 1999
By A Customer
This review is from: Graphic Java 1.2, Volume 1: AWT, Third Edition (Paperback)
Unfortunately, unlike other Java topics like language fundamentals, I/O, or programmer certification, there are very few books which cover the AWT adequitely. This book is the exception. What makes this book really special is that it presents all the basic information you need to know about what components are available and how to use them. But it also teaches you two more things on the way: (a) fundamental graphics operations such as rubberbanding, double buffering, and sprite animation which you will need to know for any programming language (b) how design patterns figure prominently in the AWT API (don't know what design patterns are? check out the BIBLE by the 'gang of four':Design Patterns : Elements of Reusable Object-Oriented Software (Addison-Wesley Professional Computing) ) Here are some of the tidbits I found most helpful: *limitations associated with peers *overriding deprecated java 1.0 methods *prevent excessive flashing by overriding update *avoiding race conditions with modal dialogs *using font metrics and validate intelligently to force text to resize with components *using the built-in image filters in java.awt.image Some things with the AWT can drive you nuts because they don't work as advertised, and this book should include, but doesn't, a discussion of: *ScrollPane displays excessive flashing when scrollling images- even his example code- this is an AWT bug which should be mentioned *the toFront method does work reliably - another huge bug *using anonymous inner classes can make some of your windows unreachable by the GC and lead to memory leaks Anyway, I practically lived with this book for two months while working on a project and would have to say this is THE reference for the AWT.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


7 of 8 people found the following review helpful:
5.0 out of 5 stars I'm not through this book yet, but it so far it's amazing!, October 21, 1999
This review is from: Graphic Java 1.2, Volume 1: AWT, Third Edition (Paperback)
There is a sad sparsity of good Java books, especially when it comes to the AWT. I am really impressed with this book and I highly suggest it to anyone that really wants to learn the JFC APIs. It would be really nice if the JDK documentation had something like this, but they left the examples and explinations out so they can sell more Java books. Well, I guess Sun needs to make some money on Java somehow, right?
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


2 of 2 people found the following review helpful:
5.0 out of 5 stars Draggable saints - it's come to this !, June 19, 2001
This review is from: Graphic Java 1.2, Volume 1: AWT, Third Edition (Paperback)
Excellent and clearly written, but you better know the difference between "extends" and "implements" or forget it. I appreciated the six versions of the ThreeDButton listener in chapter 9, and now have a much clearer understanding of event handling.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Suggested Tags from Similar Products

 (What's this?)
Be the first one to add a relevant tag (keyword that's strongly related to this product).
 
(36)
(11)
(6)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject