Items related to Core Java Foundation Classes

Kim Topley Core Java Foundation Classes ISBN 13: 9780130803016

Core Java Foundation Classes - Softcover

 
9780130803016: Core Java Foundation Classes
View all copies of this ISBN edition:
 
 
Offers the detailed information experienced developers need to make the most of JFC, from state-of-the-art user interfaces to Java's graphics capabilities. CD-ROM included. Paper.

"synopsis" may belong to another edition of this title.

Review:
With the arrival of Sun's Java Foundation Classes (JFC), developers can write Java applications that behave just like "native"-style applications, such as those written in Windows. Core Java Foundation Classes shows you how you can take advantage of the new JFC Swing classes to create Java applications with all the advanced features that today's users expect.

After a tour of the JFC/Swing packages, the author jumps right into building basic Swing applications, focusing on layout managers (which control the arrangement of JFC components onscreen) and basic graphics programming. The book aims to let you create sophisticated Java applications, and so the author discusses topics such as menus and the toolbar, keyboard handling (and mouseless operation), and dialog boxes to let you do this. The book also covers powerful Swing components, the tree and table controls. The author even looks at creating multiple document interface (MDI) applications. --Richard Dragan

From the Inside Flap:
The term Java Foundation Classes (JFC) refers to a collection of features that are included in, or can be used with, version 1.1 of the Java Development Kit (JDK) together with some new features introduced by JDK 1.2. The JFC is such a large topic area that to cover it in one volume and give it the treatment that it deserves, and that an experienced programmer would expect, is an impossible task. So, this book doesn't attempt to describe everything that falls under the JFC banner. Instead, I have chosen to concentrate on the parts that are of most immediate interest to programmers working in the commercial Java development environment today and left out those pieces that are not yet stable or would take up too much space in this volume. Most of this book is, therefore, concerned with the subset of the JFC that you can use with both JDK 1.1 and JDK 1.2. Specifically, this means the AWT as it exists in JDK 1.1, which is briefly covered as introductory or refresher material, printing, a JDK 1.1 feature that is deemed to be part of the JFC, and the Swing component set, which is the book's prime concern.

In writing about Swing, I have tried to include material that is of most interest to programmers who will want to use it to create real applications. The approach taken throughout is to explain how the Swing components and the various new Swing mechanisms (such as keyboard accelerators) work, by giving an overview of each topic and then presenting examples that show the basic principles. Then, typically, I move on to show more complex use of the component or feature and how it can be used together with other components and features to solve real application- related problems. Much of the time, you can find out some of what you want to know by reading the documentation that you get with the JDK or with the Swing package, but this documentation often falls short of explaining the more complex features and how they interact. These are the things that programmers usually need to understand before they can make full use of what is available. You'll find those explanations in this book.

I have tried to write this book as I would have liked to have seen it as an experienced programmer wanting to learn about Swing. By reading the documentation, studying the source code, disassembling the class files and trying various test cases, I have tried to do more than just scratch the surface of this large and complex topic by gathering together material and examples that are not available in Sun's documentation and presenting it in an organized, focused manner.

Who This Book Is For

This book is for experienced Java programmers who want to find out about the Java Foundation Classes and, in particular, the Swing component set. Because this book is aimed at experienced programmers, you'll find that most of the examples are not trivial, with the exception of some of those in the early chapters that illustrate basic points that can't be embedded in a more complex setting for clarity. Many of the examples that you'll find in this book are intended to be used as a starting point for writing production code that you can include in your own applications and some of the material here has been included specifically to address the most common questions that have been aired in the various news and discussion groups since the early versions of Swing were released. In particular, I have tried to address the following issues that seemed to be causing most confusion:
Creating and customizing tree components.
Custom renderers and editors for list boxes, trees and tables.
How to use the powerful Swing text components, including a detailed description of how they work.
Making proper use of the internal frames feature to create multi- document applications.
Customizing individual components by creating your own look-and- feel classes.

If you're looking for examples on how to write slick Java applets with Swing, then this book probably won't suit you. The focus in this book is entirely on writing Java applications. However, if you're already thoroughly familiar with JDK 1.1 applets, you'll find that you can use write applets using Swing very quickly and most of this book will still apply, since Swing components can be used in applets just as easily as in applications.

What You'll Need

This book is written with the assumption that you are familiar with the Java language and the core Java classes and that you can compile and run Java applications. Although this book is mainly about the Swing components, the first few chapters cover the basic principles of the Abstract Windows Toolkit (AWT), knowledge of which is a prerequisite for understanding Swing. You'll get most from this book if you have read Core Java 1.1, Volume I—Fundamentals by Cay S. Horstmann and Gary Cornell, also published by Prentice Hall, and you understand inner classes, which are heavily used both in the Swing source code and in the examples shown in this book. Core Java includes excellent coverage of this topic.

Assuming that you have a computer running Windows 95, Windows NT version 4 or later, or a version of Solaris supported by JDK 1.1 or JDK 1.2, almost everything else that you need, including versions of JDK 1.1 and JDK 1.2 and the Swing components for all of these platforms, is included on the CD- ROM, with the exception of the Swing components for use with JDK 1.1, which you will need to download from the JavaSoft web site, as described in EAbout the CD-ROM” below.. You will, of course, need some kind of basic development environment. However, a basic text editor that you can invoke from the command line is sufficient.

How This Book Is Organized

The book is divided into three sections. Section 1, “From AWT to Swing,” (Chapters 1 through 4) describes the relationship between the Abstract Windows Toolkit and Swing. Because Swing is a development based on the AWT, some understanding of the AWT is needed before you can fully utilize the Swing components. Although there are many good books on the AWT, this book opens by presenting the fundamentals for those who are not entirely confident that they fully understand them and as revision for those who do. These early chapters are, however, written not simply as a short course on the AWT — they are written with a Swing slant to them so that as early as Chapter 2 you will meet your first Swing components. I recommend that everybody reads Chapter 1. Then, depending on your background, you should read, or at least skim, Chapters 2 through 4.

Section 2, “Using Swing to Create Better Applications” (Chapters 5 through 8) deals with the various new mechanisms and components that Swing offers that have no real parallel in the AWT. Much of this section deals with individual Swing components or Swing concepts and, to a certain extent, the chapters in this section can be read in any order. Finally, Section 3, “Advanced Topics,” (Chapters 9 through 13) covers larger topic areas such as the tree and table components and the pluggable look- and -feel.

Chapter 1 introduces the Java Foundation Classes (JFC) and puts them into perspective by comparing them to the AWT. You'll learn the scope of the JFC and get a quick overview of the main features of the Swing component set. The last part of this chap ter introduces you to one of the more novel features of Swing — the so-called “pluggable look-and- feel,” which allows applications to adapt their appearance to suit the platform that they are running on or to take on the same appearance across all plat forms. It also explains the basis of this facility, the Model/View/Controller architecture (MVC).

Chapter 2 is the first of the AWT revision chapters. This chapter begins by introducing the Swing JFrame class as the top-level window of an application and uses it to illustrate basic AWT concepts such as components, containers, position, size, color, fonts and so on. The second half of the chapter includes material on event handling and introduces Swing's JLabel and JButton classes, which allow you to include text and an image on the same component. Here, you'll also find out about Swing improvements on the AWT, such as icons and accelerator keys, which now work outside of menus, to which they were confined in JDK 1.1.

Chapter 3 is concerned with global user-interface issues, principal among which is controlling the layout of components in the interface. With this in mind, almost the whole chapter is devoted to in-depth coverage of the AWT and Swing layout managers. Layout managers are a topic that has, in the past, been given only fleeting coverage in most Java books and represents a large proportion of the questions that are asked in the Java-related Internet newsgroups. Here, I have tried to create a consistent picture of all of the layout managers and to address the most common misunderstandings by illustrating how each layout manager lays out its container and how resizing the container affects the positioning of the components.

Swing includes a useful new feature that can help with understanding problems with component layout—Graphics Debugging. This feature allows you to see how your components are drawn, line-by-line, in slow motion. Chapter 3 looks at this feature and shows you how to use it and concludes with a look at the events generated by windows and by individual components.

Chapter 4 covers the AWT Graphics object and describes how you can use it to render text and draw graphics. The main body of this chapter is devoted to building a complete Swing application that allows you to use the mouse to draw and fill colored graphic shapes. While constructing this application, you'll put into practice much of what was covered in the previous two chapters and you'll also discover how to create custom icons and components with borders. The completed application will serve as a starting point for several improvements that will be made to it in rest of the book. Chapter 4 closes with a discussion of printing, another topic that has caused much confusion in the past.

Chapter 5 shows you how to develop applications that work well when the user prefers to use the keyboard rather than the mouse and introduces focus handling and the powerful concept of Actions. Actions are often used in Swing to abstract an action to be performed from the stimulus to perform itÑsuch as a keystroke or a button press. The second half of the chapter looks at how Swing supports scrolling using the new JScrollPane and JScrollBar components, which are much more powerful than their AWT counterparts.

Chapter 6 introduces the Swing menu system. Swing menus are more consistent than those available with AWT. Keyboard accelerators are available on any menu or menu item and you can use icons as well as, or instead of, text. YouÕll also see how to integrate the Actions that were introduced in Chapter 5 with the menu system and with another new Swing facility, the toolbar.

Chapter 7 is the first of two chapters that contain extensive coverage of dialogs. This chapter concentrates on dialogs that you can easily create using the JOptionPane component. These dialogs allow you to post error, warning and information messages or present options to the user and wait for a choice to be made. Two more useful standard dialogs, the file chooser and color chooser, are also covered in this chapter.

Chapter 8 shows you how to use the Swing JDialog class to create your own dialogs. This chapter also introduces many of the Swing components that are useful in dialogs, such as tabbed panes, list boxes, combo boxes, progress controls and sliders.

In Chapter 9, you'll find an in-depth description of the Swing text controls, starting with the simple JTextField and JTextArea components, which are related to the AWT TextField and TextArea controls. The Swing controls are underpinned by a complex but powerful document model that is covered in detail in this chapter. The description of the document model is followed by a description of two new Swing text controls — JTextPane, which allows multiple fonts, colors, images and event components to be mixed in a view of a document and the flexible JEditorPane, which adapts itself to render documents held as plain text, HTML, Rich Text Format and a potentially infinite number of other formats.

Chapter 10 describes the Swing tree control and shows you how to build a tree, how to control which parts of it are expanded or collapsed and how to traverse the tree in various different ways. This chapter also shows you a custom control based on the tree that presents a file system in a manner familiar to users of the Windows platform and it describes in detail how to customize trees using specially-developed renderers to control how the various pieces of the tree are drawn.

Chapter 11 is concerned with the table component. This component allows you to present data in a tabular form. You'll see how to determine the order of columns and their sizes and how to change the way in which the data in the table is displayed. There is also a section on table cell editors, which shows you how to present to the user a suitable interface for changing the content of the table.

Chapter 12 discusses SwingÕs support for multiple-document applications. Starting with a discussion of the basic components that make multiple- document applications possible, the chapter moves on to discuss desktop panes and icons and the desktop manager. You'll also see how to create a custom desktop pane that automatically cascades or tiles the windows that it manages and how to customize the desktop manager itself.

Finally, Chapter 13 returns to the theme of the pluggable look-and-feel that was first touched on in Chapter 1. This chapter shows the underlying support for changing the look-and-feel of an application, then shows you how to create your own user interface for the Swing button component.

Finally, you'll see various ways to introduce look-and-feel related customizations into your application and how to create your own look-and- feel.

This book covers all of the Swing components and most of the other important Swing features. For ease of reference, the following table lists the Swing components, along with the chapters in which they are described.
Component

Chapter Component

Chapter
Box 3

JRadioButtonMenuItem

6 BoxLayout 3

JRootPane

2 JButton 2

JScrollBar

5 JCheckBox 8

JScrollPane

5 JCheckBoxMenuItem 6

JSeparator

8 JComboBox 8

JSlider

8 JComponent 2

JSplitPane

9 JDesktopPane 12

JTabbedPane

8 JDialog 8

JTable

11 JEditorPane 9

JTextArea

9 JFrame 2

JTextField

9 JInternalFrame 12

JTextPane

9 JLabel 2

JToggleButton

8 JLayeredPane 12

JToolBar

6 JList 8

JToolTip

8 JMenu 6

JTree

10 JMenuBar 6

JViewport

5 JMenuItem 6

JWindow

2 JOptionPane 7

OverlayLayout

3 JPanel 2

ProgressMonitor

8 JPasswordField 9

ProgressMonitorInputStream

8 JPopupMenu 6

Timer

8 JProgressBar 8

UIDefaults

13 JRadioButton 8

UI...

"About this title" may belong to another edition of this title.

  • PublisherPrentice Hall
  • Publication date1998
  • ISBN 10 0130803014
  • ISBN 13 9780130803016
  • BindingPaperback
  • Number of pages1168
  • Rating

Other Popular Editions of the Same Title

9784894711815: JFCプログラミング〈Vol.2〉Swingコンポーネントプログラミング応用編 (Java books)

Featured Edition

ISBN 10:  4894711818 ISBN 13:  9784894711815
Hardcover

Top Search Results from the AbeBooks Marketplace

Stock Image

Kim Topley
Published by Prentice-Hall (1998)
ISBN 10: 0130803014 ISBN 13: 9780130803016
New Softcover Quantity: 1
Seller:
Books Puddle
(New York, NY, U.S.A.)

Book Description Condition: New. pp. 1300 1st Edition. Seller Inventory # 2650370805

More information about this seller | Contact seller

Buy New
US$ 58.73
Convert currency

Add to Basket

Shipping: US$ 3.99
Within U.S.A.
Destination, rates & speeds
Stock Image

Topley Kim
Published by Prentice-Hall (1998)
ISBN 10: 0130803014 ISBN 13: 9780130803016
New Softcover Quantity: 1
Seller:
Majestic Books
(Hounslow, United Kingdom)

Book Description Condition: New. pp. 1300. Seller Inventory # 58140458

More information about this seller | Contact seller

Buy New
US$ 54.92
Convert currency

Add to Basket

Shipping: US$ 8.29
From United Kingdom to U.S.A.
Destination, rates & speeds