The most comprehensive guide to the Java Foundation Classes available. Provides Java developers with the skills needed to build professional, cross platform applications that take full advantage of the Java Foundation Classes. Paper. CD-ROM included.
"synopsis" may belong to another edition of this title.
David Geary is an award-winning software technical writer with over ten years experience in the computer industry. He is the co-author of Graphic Java: Mastering the AWT, and Automating Solaris Installations: A Custom JumpStart Guide (both SunSoft Press/Prentice Hall).
Graphic Java 2 is the most comprehensive guide to the Java Foundation Classes (JFC) available. Three volumes cover all aspects of the JFC providing java developers with the skills needed to build professional, cross platform applications that take full advantage of the Java Foundation Classes.
The AWT is the cornerstone of the Java Foundation Classes. Volume 1 provides detailed descriptions of every aspect of the AWT, including:
Java expert David Geary provides clear and in-depth explanations of both fundamental and advanced AWT concepts. The layout manager chapter, for example, is over 100 pages long and includes what readers have called the best explanation of GridBagLayout on the planet. A GridBagLab application on the CD lets you explore GridBagLayout on your own.
The accompanying CD-ROM includes all of the example code from the book, ready to run on Solaris(tm), Windows 95, Windows NT, and Macintosh along with the JDK(tm) for those platforms.
Preface
The 1.2 JDK (Java Development Kit) offers vastly improved support over its predecessors for developing graphical user interfaces and graphical applets/applications in the form of the Java Foundation Classes. The Java Foundation Classes are represented by four APIs: AWT, Swing, Accessibility and the 2D API.
The Abstract Window Toolkit (AWT) is Java's original user interface toolkit that provides a basic set of components such as labels, buttons, scrollbars etc. The AWT also includes a great deal of infrastructure for graphical components such as a delegation event model, layout management, and support for data transfer and lightweight components.
Swing is a second user interface toolkit that is built on the AWT's infrastructure. Swing offers a much more extensive set of components than the AWT; Swing's 40 components outnumber the AWT by a 4:1 ratio. Some Swing components (labels, buttons, etc.) are designed to replace their AWT counterparts, whereas other Swing components provide extra capabilities not found in the AWT (trees and tables).
The Accessibility API allows developers to implement Java applets and applications that are accessible to users with disabilities. The Accessibility API can also be used to develop alternative interfaces for nomadic users, such as a hypothetical Java navigational system that tells drivers (instead of showing them with a map display) went to turn in an audible fashion.
The 2D API encompasses a number of major enhancements to the AWT's graphics model in terms of manipulating colors, shapes and images and text.
Why The AWT and Why This Book?
The 1.2 JDK comes with the Swing set of components which includes a complete set of lightweight replacements for the AWT's heavyweight components. As a result, a common misconception is that Swing is a replacement for the AWT, but that is not the case. Swing is built on top of the AWT, and in fact, every Swing component is a bonafide AWT component. Because Swing components are in fact AWT components, it is imperative to have a good grasp of how AWT components behave and a what makes the AWT tick.
Graphic Java is meant, first and foremost, to help you master the AWT. Both fundamental and advanced concepts of the AWT are fully explored in the pages that lie ahead. Each AWT component is examined in detail, and AWT Tips are provided to illuminate some of the AWT's dark corners. No stone is left unturned.
What You'll Find Inside
After reading Graphic Java, you will have a thorough grasp of how the AWT is designed, and how to best take advantage of that design. The following is a sample of the coverage provided in the pages that lie ahead.
Peers
You will understand the peer architecture of the AWT, along with the pros and cons of the peer approach. For instance, you'll know which Component methods behave differently if invoked before a component's peer has been created, and what to do about it.
Clipboard and Data Transfer
You'll understand the data transfer model employed by the AWT, and how to utilize both local clipboards and the system clipboard. While the AWT only provides the ability to transfer strings to and from a clipboard, Graphic Java shows you how to put other data types on the clipboard, with examples of transferring both images and custom components.
Lightweight Components
In addition to being able to implement lightweight custom components, you'll also know how to drag them across a double buffered container, and even how to animate them on a playfield. You will understand how double buffering works, and why lightweight components should be displayed in a double buffered container. You will know the pitfalls of placing lightweight components in a container, and why lightweight containers must be manually fitted with a layout manager.
Layout Managers
You will have a complete grasp of layout managers, including the behemoth, GridBagLayout, and you will be able to implement custom layout managers with ease. You will understand how to force a container to layout its components, and why it is sometimes necessary to do so.
Internationalization and Serialization
You'll be able to internationalize a graphical user interface, and serialize both AWT components and their event listeners.
Scrolling
You will be able to scroll any number of components in a container by using a scrollpane. You'll also understand the limitations of the scrollpane class and why it is sometimes necessary to have a peerless scrolling framework. Of course, we'll discuss the implementation of such a scrolling framework from the Graphic Java Toolkit, which you are free to use for your own purposes.
Graphic Java Content
The delegation event model, lightweight components, clipboard and data transfer, desktop colors, mouseless operation, and printing are all thoroughly covered. You'll also find extensive coverage of scrolling, menus (including pop-up menus), image manipulation, graphics, fonts and fontmetrics, dialogs, text components, etc.
Audience
This book is written for object-oriented developers working in Java. There are numerous books explaining details of the Java language and how it works vis-a-vis Visual Basic, C, C++, etc. The details of the language are left to those books.
Internet Sources of Information
There are several online sources of information on Java.For updates about this book and information about other books in the SunSoft Press Java Series, look on the web at:
sun/books/books/Geary/Geary.html
For some cool graphics, take a look at:
pixelsight:80/PS/pixelsite/pixelsite.html
Conventions Used in This Book
Table P-1 shows the coding conventions used in this book.
Table P-1 Coding Conventions
Convention
Example
Class names have initial capital letters.
public class LineOfText.
Method names have initial lowercase and the rest of the words have an initial capital letter. public int getLength()
Variable names have initial lowercase and the rest of the words have an initial capital letter.
private int length
private int bufferLength
static variables begin with an underscore.
protected static int _defaultSize = 2;
Note that, for the most part, methods are referred to without their arguments; however, we include the arguments when the discussion warrants including them.
Table P-2 shows the typographic conventions used in this book.
Table P-2 Typographic Conventions.
Typeface or Symbol
Description
Indicates that the accompanying code, command, or file is available on the CD that accompanies this book.
courier
Indicates a command, file name, class name, method, argument, Java keyword, HTML tag, file content, or code excerpt.
bold courier
Indicates a sample command-line entry.
italics
Indicates definitions, emphasis, a book title, or a variable that you should replace with a valid value.
"About this title" may belong to another edition of this title.
FREE shipping within U.S.A.
Destination, rates & speedsSeller: Better World Books, Mishawaka, IN, U.S.A.
Condition: Good. 3rd Edition. Used book that is in clean, average condition without any missing pages. Seller Inventory # 4101348-6
Quantity: 1 available
Seller: Gulf Coast Books, Memphis, TN, U.S.A.
paperback. Condition: Good. Seller Inventory # 0130796662-3-32316196
Quantity: 1 available
Seller: ThriftBooks-Atlanta, AUSTELL, GA, U.S.A.
Paperback. Condition: Very Good. No Jacket. May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less 3.05. Seller Inventory # G0130796662I4N00
Quantity: 1 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: Very Good. No Jacket. May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less 3.05. Seller Inventory # G0130796662I4N00
Quantity: 1 available
Seller: HPB-Red, Dallas, TX, U.S.A.
paperback. Condition: Good. Connecting readers with great books since 1972! Used textbooks may not include companion materials such as access codes, etc. May have some wear or writing/highlighting. We ship orders daily and Customer Service is our top priority! Seller Inventory # S_425548312
Quantity: 1 available
Seller: WorldofBooks, Goring-By-Sea, WS, United Kingdom
Paperback. Condition: Good. The book has been read but remains in clean condition. All pages are intact and the cover is intact. Some minor wear to the spine. Seller Inventory # GOR004046114
Quantity: 1 available