Definitive Guide to Swing for Java 2

Overview

Completely updated for the 1.3 edition of the Java 2 Platform, the second edition of this widely praised book is the one-stop resource for serious Java developers. This book shows programmers those parts of the Swing component set they will use on a daily basis to create graphical user interfaces. You'll learn about the Model-View-Controller architecture that lies behind all Swing components, and you'll discover how to customize the components for specific environments. You'll be provided with custom editors and ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (13) from $1.99   
  • New (2) from $60.53   
  • Used (11) from $0.00   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$60.53
Seller since 2008

Feedback rating:

(215)

Condition:

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.

New

Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$80.00
Seller since 2015

Feedback rating:

(241)

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
Close
Sort by
Sending request ...

Overview

Completely updated for the 1.3 edition of the Java 2 Platform, the second edition of this widely praised book is the one-stop resource for serious Java developers. This book shows programmers those parts of the Swing component set they will use on a daily basis to create graphical user interfaces. You'll learn about the Model-View-Controller architecture that lies behind all Swing components, and you'll discover how to customize the components for specific environments. You'll be provided with custom editors and renderers for use with tables, trees, and list components. You'll also find an overview of the Swing architecture, event handling with the Swing component set, core Swing components, toggleable components, Swing menus and toolbars, borders, pop-ups and choosers, and more.

  • Shows how to create graphical user interfaces with the 1.3 version of the Swing component set
  • Offers a clear treatment of the Model-View-Controller architecture
  • Demonstrates the creation and customization of reusable Swing component extensions
  • Explores the Swing text and html package, and JFC drag-and-drop capabilities
  • Provides in-depth coverage of Jtree and Jtable


Read More Show Less

Editorial Reviews

From the Publisher
From the reviews of the first edition:
"...I didn't really expect to get much out of yet another Swing book. To my great surprise, John Zukowski has put together a clearly documented, insightful, comprehensive, and entertaining exploration of the Swing API, complete with the kind of treatment that offers something new to even the most sophisticated Swing developer. What's more, the way the material is presented makes this book easily accessible to even novice Swing developers, so I can't help but recommend it highly for anyone who has, or plans to do, any Java user interface development...."
(DevX)
Read More Show Less

Product Details

  • ISBN-13: 9781893115781
  • Publisher: Apress
  • Publication date: 11/5/2000
  • Edition description: 2nd ed. 2000
  • Edition number: 2
  • Pages: 890
  • Product dimensions: 7.43 (w) x 9.29 (h) x 1.83 (d)

Meet the Author

John Zukowski has been involved with the Java platform since it was just called Java, since 1995. He writes a monthly column for Sun's Core Java Technologies Tech Tips and Technology Fundamentals Newsletter. He has contributed content to numerous other sites, including jGuru, DevX, Intel, and JavaWorld. He has written many other popular titles on Java, including Java AWT Reference (O'Reilly), Mastering Java 2 (Sybex), Borlands' JBuilder: No Experience Required (Sybex), Learn Java with JBuilder 6 (Apress), Java Collections (Apress), and The Definitive Guide to Swing (Apress).
Read More Show Less

Read an Excerpt

Chapter 17: Tables

Chapter 16 took an in-depth look at the Swing JTree component. In this Chapter, we'll examine the many details of the JTable component. The component is the standard Swing component for displaying two-dimensional data in the form of a grid, as shown in Figure 17-1.
NOTE All the examples in this Chapter will work fine without configuring your environment to display Japanese fonts. However, instead of seeing the ideographs, you will see characters such as question marks or boxes, depending upon your platform. In order to see the Kanji ideographs in the sample programs, you will need to be using the Japanese version of the font.properties file (properties.ja ) and have the necessary Japanese fonts installed. In addition to the Windows NT installation CD, you can find the necessary Windows fonts at http://ftp.monash.edu.au/pub/nihongo/ ie3lpkja.exe. Solaris users must contact Sun to request the Asian outline fonts for Solaris environments. More on adding fonts to the Java runtime environment is at http://java.sun.com/products/jdk/1.3/docs/guide/intl/ fontprop.html.

Figure 17-1: Sample JTable...

Introducing Tables

Like the JTree component, the JTable component relies on numerous support classes for its inner workings. For the JTable , the support classes are found in the javax.swing.table package. The cells within the JTable can be selected by row, column, row and column, or individual cell. It's the responsibility of the current ListSelectionModel settings to control the selection within a table.

The display of the different cells within a table is the responsibility of the TableCellRenderer; the DefaultCellRenderer offers one such implementation of the TableCellRenderer interface in a JLabel subclass.

Managing the data stored in the cells is accomplished through an implementation of the TableModel interface. The AbstractTableModel provides the basics of an implementation of the interface without any data storage. By comparison, the DefaultTableModel encapsulates the TableModel interface and uses a vector of vectors for the data storage. You extend AbstractTableModel if you need a different type of storage than the kind supplied by the DefaultTableModel, for instance, if you already had the data in your own data structure.

The TableColumnModel interface and the DefaultTableColumnModel implementation of the interface manage the table's data as a series of columns. They work together with the TableColumn class to allow for greater flexibility in manipulating individual columns. For example, you can store columns of data in the TableModel in an order that's different than the display order within the JTable. The TableColumnModel manages a second ListSelectionModel to control table column selection.

At the top of every column is a column header. By default, the TableColumn class relies on the JTableHeader class to render a text column header. Nevertheless, you must embed the JTable in a scroll pane to see the default header.

Cells within a JTable can be editable. If a cell is editable, how the editing works depends on the TableCellEditor implementation, such as the DefaultCellEditor implementation, which extends from AbstractCellEditor . In addition, no classes exist to handle individual rows. Rows must be manipulated on a cell-by-cell basis. However, behind the scenes, the JTable does use the SizeSequence utility class to deal with variable height rows. However, you won't need to manipulate it yourself.

Figure 17-2 shows these class interrelationships.

NOTE There are additional interrelationships among the elements used by the JTable component. These relationships will be explored later in this chapter with each specific interface and class.

To visualize how the JTable elements all fit together, examine Figure 17-3.

Class JTable

We'll first look at the JTable class, which gives you a way to display data in tabular form....
Read More Show Less

Table of Contents

Introduction.- Swing Overview.- Event Handling with the Swing Component Set.- The Model-View/Controller Architecture.- Core Swing Components.- Toggle Buttons.- Swing Menus and Toolbars.- Borders.- Root Pane Containers.- Pop-Ups and Choosers.- Swing Layout Managers.- Advanced Swing Containers.- Bounded Range Components.- List Model Controls.- Basic Text Components.- Advanced Text Capabilities.- Sculpting Trees.- Tables.- Understanding the Pluggable Look and Feel Architecture.- Becoming Undone.- Appendix A: Updating UI Manager Properties.- Appendix B: About the CD-ROM.
Read More Show Less

Customer Reviews

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

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com 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 & Noble.com 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 & Noble.com 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 BN.com 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

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com 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 BN.com. 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)