did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781590594742

Pro Java Programming

by
  • ISBN13:

    9781590594742

  • ISBN10:

    1590594746

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2005-06-13
  • Publisher: Textstream
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $59.99 Save up to $41.43
  • Buy New
    $58.19
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

Ideal for the experienced C++, Perl or other language programmer who is new to Java or to the Java programmer who is beyond the Beginning level Java book, Pro Java Programming covers the latest J2SE 5.0 platform and the core JDK. It shows how to take advantage of the finer points of the core and standard edition of Java 2. Over the course of this book, you'll discover the particulars of working with the Java language and APIs to develop applications in many different contexts - as well as delving into more advanced topics such as enums, generics, XML, metadata or the Swing APIs for graphical user interface design and development. By the end of the book, you'll be fully prepared to take advantage of the ease of development Java offers, and able to create powerful and sophisticated Java applications.

Table of Contents

About the Author xvii
About the Technical Reviewer xix
Acknowledgments xxi
Introduction xxiii
CHAPTER 1 Going Inside Java
Java's Architecture
2(1)
The Java Virtual Machine
3(10)
Different JVM Implementations
4(1)
The JVM As a Runtime Execution Environment
5(1)
The Runtime Data Areas of the JVM
6(1)
The Garbage Collector
7(1)
The JVM: Loading, Linking, and Initializing
8(3)
Bytecode Execution
11(2)
The Java Class File Format
13(1)
The Java Programming Language and APIs
14(1)
The Java Programming Language
14(1)
The Java APIs
14(1)
Java Utility Tools: Making the Most of the JVM
15(3)
The Java Compiler
15(1)
The Java Interpreter
16(1)
The Java Class Disassembler
17(1)
Summary
18(3)
CHAPTER 2 Designing Libraries, Classes, and Methods 21(68)
Library Design
21(2)
Package Design
22(1)
Class Design
23(30)
Loose Coupling
23(15)
Strong Cohesion
38(4)
Encapsulation
42(3)
Immutable Objects and Fields
45(1)
Overriding Object Methods
46(7)
Method Design
53(34)
Passing Parameters
54(3)
Method Naming
57(1)
Minimizing Duplication of Code
58(2)
Variable Arguments
60(2)
Using Exceptions
62(19)
Assertions
81(3)
Enumerations
84(3)
Summary
87(2)
CHAPTER 3 Using Threads in Your Applications 89(62)
Threading in Java
90(2)
Creating Threads
92(2)
Disadvantages of Using Threads
94(2)
Slow Initial Startup
94(1)
Resource Utilization
94(1)
Increased Complexity
94(2)
Thread Management
96(5)
Synchronizing the Use of Shared Resources
101(8)
Nested Calls to Synchronized Methods and Code Blocks
104(1)
Synchronized Blocks vs. Methods
104(1)
Deadlocks
105(4)
Thread Priorities
109(1)
Daemon Threads
110(1)
Adding Threads to an Application
111(9)
Controlling Threads
120(16)
Starting a Thread
123(1)
Making a Thread "Sleep"
124(4)
Suspending a Thread
128(3)
Resuming a Thread
131(1)
Stopping a Thread
132(2)
Interrupting a Thread
134(2)
Completing DownloadManager
136(3)
Deprecated Methods in Thread
139(1)
DownloadFiles
140(6)
ThreadGroup
143(3)
Uncaught Exceptions
146(1)
Voluntarily Relinquishing the Processor
147(2)
Concurrency Utilities
149(1)
Summary
150(1)
CHAPTER 4 Using Collections 151(42)
The Evolution of Collections
154(1)
Java 2/Java 1.2
154(1)
Java 5/Java 1.5
154(1)
Collection Classes and Interfaces
155(33)
Collection
155(5)
List
160(5)
Listlterator
165(1)
ArrayList
165(2)
LinkedList
167(1)
Vector
168(1)
Stack
168(1)
Set
168(4)
HashSet
172(1)
Constructors
172(1)
LinkedHashSet
173(1)
TreeSet
173(4)
EnumSet
177(1)
Map
178(3)
HashMap
181(1)
LinkedHashMap
182(1)
TreeMap
182(1)
EnumMap
182(1)
IdentityHashMap
182(1)
WeakHashMap
183(1)
ConcurrentHashMap
184(1)
Queue
184(1)
PriorityQueue
185(1)
PriorityBlockingQueue
185(1)
ArrayBlockingQueue
186(1)
LinkedBlockingQueue
186(1)
ConcurrentLinkedQueue
187(1)
SynchronousQueue
187(1)
DelayQueue
187(1)
Tips on Using Collections
188(3)
Shallow vs. Deep Copies
189(1)
Referencing an Interface Instead of an Implementation
190(1)
Summary
191(2)
CHAPTER 5 Using Layout Managers 193(76)
Layout Managers and GUI Construction
193(3)
CardLayout
196(2)
Constructing a CardLayout
196(1)
Child Component Sizes
197(1)
Child Component Locations
197(1)
Resizing Behavior
197(1)
Container Size
197(1)
FlowLayout
198(4)
Constructing a FlowLayout
198(1)
Constraints
198(1)
Child Component Sizes
198(1)
Child Component Locations
198(2)
Resizing Behavior
200(1)
Container Size
201(1)
GridLayout
202(5)
Constructing a GridLayout
203(2)
Constraints
205(1)
Child Component Sizes
205(1)
Child Component Locations
206(1)
Resizing Behavior
206(1)
Container Size
207(1)
BorderLayout
207(4)
Constructing a BorderLayout
209(1)
Constraints
209(1)
Child Component Sizes
209(1)
Child Component Locations
210(1)
Resizing Behavior
210(1)
Container Size
211(1)
GridBagLayout
211(30)
Constructing a GridBagLayout
215(1)
Constraints
215(24)
Child Component Sizes
239(1)
Child Component Locations
240(1)
Resizing Behavior
241(1)
Container Size
241(1)
BoxLayout
241(12)
Alignment Values, Ascents, and Descents
242(4)
Constructing a BoxLayout
246(1)
Constraints
247(1)
Child Component Sizes
247(2)
Child Component Locations
249(1)
Resizing Behavior
249(1)
Container Size
249(1)
Swing's Box Class
249(4)
Guidelines for Using Layout Managers
253(6)
Combining Layout Managers
253(3)
Absolute Positioning Without a Layout Manager
256(1)
Invisible Components
256(1)
Specifying an Index When Adding a Component
256(3)
Creating Your Own Layout Manager
259(8)
LayoutManager2 Methods
260(3)
LayoutManager Methods
263(4)
Using a Custom Layout Manager
267(1)
Summary
267(2)
CHAPTER 6 Using Swing's JTable 269(60)
The Data Model
270(5)
Using JScrollPane with JTable
275(3)
JTable's Column-Oriented Design
278(1)
Table Resizing
278(1)
Column Resizing
279(3)
AUTO_RESIZE_OFF
280(1)
AUTO_RESIZE_NEXT_COLUMN
280(1)
AUTO_RESIZE_SUBSEQUENT_COLUMNS
280(1)
AUTO_RESIZE_LAST_COLUMN
281(1)
AUTO_RESIZE_ALL_COLUMNS
281(1)
Cell Rendering
282(8)
Creating Custom Renderers
282(6)
JTable's Default Renderers
288(2)
Editing Table Cells
290(6)
Cell Editors
291(5)
Table Selection Settings
296(6)
Combining Row, Column, and Cell Selection Modes
296(1)
List Selection Modes
297(1)
Selection Mode Combinations
298(3)
Setting Selections Programmatically
301(1)
Table Headers
302(14)
Drawing Headers
302(2)
Tooltips and Renderer Reuse
304(2)
JTableHeader
306(5)
Creating Row Headers
311(5)
Sorting Table Rows
316(7)
Dynamic Sort Column Selection
318(3)
Using Comparable
321(2)
Adding and Removing Table Rows
323(3)
Displaying a Particular Table Row
326(1)
Summary
327(2)
CHAPTER 7 Using Swing's JTree 329(54)
JTree Terminology
330(1)
Creating a JTree
331(18)
TreeModel
335(1)
Creating Tree Nodes
336(13)
TreePath
349(2)
TreeModelListener
351(1)
treeNodesChanged()
351(1)
treeNodeslnserted()
352(1)
treeNodesRe moved()
352(1)
treeStructureChanged()
352(1)
TreeModelEvent
352(1)
getTreePath(), getPath()
352(1)
getChildren()
352(1)
getChildIndices()
353(1)
DefaultTreeModel
353(2)
Rendering Tree Nodes
355(7)
Creating a Custom Renderer
357(5)
Editing Tree Nodes
362(7)
DefaultTreeCellEditor and DefaultCellEditor
364(2)
Creating a Custom Editor
366(2)
Limiting Edits to Certain Nodes
368(1)
Customizing Branch Node Handles
369(2)
Line Style with the Java/Metal Look and Feel
371(1)
Node Selection
372(7)
Selection Modes
373(3)
TreeSelectionListener
376(1)
TreeSelectionEvent
376(1)
Selection Methods in JTree
377(2)
Collapsing and Expanding Nodes
379(3)
Detecting Collapses and Expansions
380(2)
Summary
382(1)
CHAPTER 8 Adding Cut-and-Paste Functionality 383(26)
Clipboards: Where Cut and Copied Data Is Stored
384(6)
Using the System Clipboard
384(1)
Using Clipboard
385(1)
Using Transferable
385(2)
Using ClipboardOwner
387(1)
Using DataFlavor
388(2)
Storing and Retrieving Serialized Java Objects
390(12)
Transferring Between Java And Native Applications
402(1)
Writing Arbitrary Binary Data
403(5)
Summary
408(1)
CHAPTER 9 Adding Drag-and-Drop Functionality 409(38)
Introducing Drag-and-Drop Operation Types
410(1)
Using the Predefined Cursors
410(1)
Performing File Selection Drops from Native Applications
411(22)
Adding Drop Support
411(10)
Adding Drag Support
421(12)
Performing Local Transfers
433(4)
Introducing Local Object Data Flavors
433(2)
Handling the Reference Transfer
435(2)
Performing Link/Reference Operations
437(1)
Transferring Between Java and Native Applications
438(2)
Transferring Text Data
440(5)
Transferring Text Between Java and Native Applications
440(3)
Creating a New Transferable for Text Data
443(2)
Summary
445(2)
CHAPTER 10 Printing 447(30)
Locating Print Services
448(10)
DocFlavor
449(3)
Choosing the Right Printer
452(1)
AttributeSet
453(1)
Attribute
453(1)
Attribute Roles
453(1)
Interfaces and Implementations
454(3)
Printer Selection via User Interface
457(1)
Creating a Print Job
458(1)
Defining the Document to Print
459(1)
Initiating Printing
459(1)
Monitoring and Controlling a Print Job
460(2)
Monitoring Attribute Changes
460(2)
Canceling a Print Job
462(1)
Introducing Service-Formatted Printing
462(14)
Support Classes
464(4)
Sample Printing Application
468(8)
Summary
476(1)
CHAPTER 11 Introducing Java Database Connectivity (JDBC) 477(56)
SQL Standards and JDBC Versions
479(1)
JDBC Drivers
479(3)
Driver Types
480(2)
Obtaining a Database Connection
482(14)
JDBC URL Formats
483(1)
Connection
484(1)
Obtaining Connections from a DataSource (2.x Optional Package)
484(3)
DatabaseMetaData
487(9)
Statement
496(7)
executeUpdate()
496(1)
executeQuery()
497(1)
execute()
497(1)
addBatch(), executeBatch()
497(1)
PreparedStatement
498(2)
CallableStatement
500(2)
ParameterMetaData
502(1)
JDBC Data Types
503(4)
ARRAY
504(1)
BLOB, CLOB
505(1)
DATALINK
505(1)
DATE, TIME, TIMESTAMP
505(1)
DISTINCT
506(1)
STRUCT
506(1)
REF
507(1)
JAVA_OBJECT
507(1)
OTHER
507(1)
ResultSet
507(8)
Forward-Only vs. Scrollable (Scrollability Type)
508(1)
Read-Only vs. Updatable (Concurrency Mode)
508(1)
Update Sensitivity
508(1)
Holdability
509(1)
Selecting ResultSet Properties
509(1)
Using ResultSet
510(5)
ResultSetMetaData
515(1)
RowSet
515(2)
Transactions
517(7)
Savepoints
520(1)
Read-Only Transactions
521(2)
Distributed Transactions
523(1)
Connection Pooling
524(2)
Pooling Properties
525(1)
Errors and Warnings
526(4)
SQLException
526(3)
SQLWarning
529(1)
Debugging
530(1)
Releasing Resources
531(1)
Summary
531(2)
CHAPTER 12 Internationalizing Your Applications 533(54)
Locales
534(2)
Resource Bundles
536(6)
Creating a ResourceBundle
538(4)
Locale-Sensitive Formatting and Parsing
542(6)
Formatting and Parsing Dates
543(3)
Formatting and Parsing Times
546(1)
Formatting and Parsing Numeric Values
546(2)
MessageFormat
548(5)
Specifying a Locale
551(1)
Specifying a Format Object
552(1)
ChoiceFormat
553(3)
Parsing Text Data
556(6)
Breaklterator
556(6)
Text Comparisons and Sorting
562(3)
Collator Strength
563(1)
Decomposition Mode
564(1)
Internationalizing an Application
565(12)
Changing the Locale at Runtime
577(7)
native2ascii
584(1)
Summary
585(2)
CHAPTER 13 Using XML 587(50)
XML vs. HTML
588(6)
Describing the Data
590(1)
Well-Formed Documents
590(4)
When and Why to Use XML
594(1)
Creating an XML Document
595(2)
Root Elements
596(1)
Components of an XML Document
596(1)
Parsing and Validation
597(30)
Parsing with the DOM Implementation in JAXP
598(17)
Traversing a Document with DOM
615(6)
Editing Documents with DOM
621(6)
Transforming XML Documents
627(8)
Performing an XSL Transformation
629(6)
Summary
635(2)
CHAPTER 14 Adding Annotations 637(30)
Using Annotations
639(8)
Override
640(2)
SuppressWarnings
642(5)
Creating Custom Annotations
647(7)
Target
649(1)
Retention
650(2)
Documented
652(1)
Inherited
653(1)
Replacing External Metadata
654(4)
Using the Annotation Processing Tool
658(8)
AnnotationProcessorFactory
658(3)
Declaration
661(3)
Generating Side Files
664(2)
Summary
666(1)
INDEX 667

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program