-
- Weitere Informationen zu diesem Buch:
Inhaltsverzeichnis | Index | Probekapitel | Rezensionen |
Beispiele |
- Weitere Informationen zu diesem Buch:
Third Edition Juni 2005
ISBN 978-0-596-00873-4
Weitere Informationen zu diesem Buch
Inhaltsverzeichnis |
Index |
Probekapitel |
Rezensionen |
Beispiele |
Index
[ Symbols ], [ Numbers ], [ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ K ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ X ], [ Y ], [ Z ],
Symbols[ Top ]
, (comma) operator in C, 95
+ (concatenation) operator, 100, 300, 306
* (dereference) operator in C, 100
. (dot) operator, 101, 128
= = (identity) operator, 55, 302, 368
[ ] (index) operator, 118
?= (lookahead) operator, 334
?! (negative lookahead) operator, 334
! (not) operator, 63
++ operator, 100
| (OR) operator, 844
[...] (range) operator, 328
<?>, 236
Numbers[ Top ]
2D API, 689
ColorModels, SampleModels, and DataBuffers, 735
double buffering, 714
drawing, 712-720
fonts, 702-707
images
operators in, 741
viewing, 707-712
limiting drawing with clipping, 715
navigating, 693-700
printing, 703, 720
rendering pipelines, 691-693
shapes
filling, 700
stroking, 702
A[ Top ]
absolute paths, 377, 407
absolute positioning, 687
absolute time, 443
abstract modifiers, 168
Abstract Window Toolkit (see AWT)
AbstractFormatter class, 626
AbstractTableModel class, 645
accelerators, 601, 603
accept( ) method (ServerSocket), 437, 440, 445
access
annotations, 208
basic access modifiers, 178
concurrent (FileChannel class), 430
constructors, 206
fields, 203
generic type information, 208
methods, 127, 204
Reflection API, 203
variables, 101
(see also security)
accessor methods, 126, 203
action commands, 586, 592
action events
calculator application (example), 686
Juggler Bean, connecting to button, 760
menus, 601
in text components, 624
ActionEvent class, 46, 54, 590
ActionListener interface, 54
implementing, 570, 580
object registration, 556
pop-up menus, 606
program registration, 586
actionPerformed( ) method, 54, 556, 592, 606, 624
activeCount( ) method, 277
adapter classes
anonymous, 190
EventHandler, creating with, 782
generic adapter for ActionEvents, 782
listening for PropertyChangeEvents, 765
adapters
BeanShell, 880
classes, 580
dummy, 582
dynamic interface, 209
inner classes as, 184
JavaBeans, 759-763
threads, 254
adaptive compilation, 6
add( ) method, 216
Calendar class, 597
Container class, 53
GridBagConstraints class, 673
List interface, 360
Set interface, 360
addCookie( ) method, 519
addElement( ) method, 139
addGB( ) method, 674, 686
addHeader( ) method, 509
addImage( ) method, 728
adding static variables, 129
addMouseListener( ) method, 46
addMouseMotionListener( ) method, 48
addObserver( ) method, 387
addresses (IP), 438
addTab( ) method, 611
ad-hoc polymorphism, 142
AdjustmentEvents class, 615
administration (see management)
AffineTransformOp operator, 741
algorithms
DSA, 813
for garbage collection, 148
image scaling, 711
align attribute (HTML), 800
aligning text, 317
allocate( ) method, 427
allocating
memory, 13
objects, 143-147
alpha RGB (ARGB) color model, 736
AlphaComposite class, 427, 692, 700
alt attribute (HTML), 801
alternation in patterns, 331
anchoring components, 680
animations, 731
creating and starting threads for, 251
delta arrays, 733
double buffering, 731
drawing, 731
GIF89a files, 708
juggling beans, 758
running threads with adapters, 254
annotations, 211-213
accessing, 208
facility, 86
anonymous arrays, 122
anonymous inner classes, 182, 188, 771, 782
ActionListener, implementing with, 588
in BeanShell, 880
implementing Runnable interface, 255
listeners for action events, 760
anonymous type definitions, 848
Ant, 540-543
Eclipse IDEs, 872
Apache Project, Tomcat server, 502
APIs (application programming interfaces), 883
2D API, 689
drawing, 712-720
filling shapes, 700
fonts, 702-707
navigating, 693-700
printing, 720
rendering pipelines, 691-693
stroking shapes, 702
viewing images, 707-712
JAI, 729
java.util.regex, 335
javax.xml.validation, 849
JAXB, 851-856
logging, 379-386
Preferences, 376-379
ServletContext API, 520
text-related, 299
XPath, 839
append( ) method, 636
JTextArea class, 624
StringBuffer class, 307
appending data to existing files, 411
Apple QuickTime (.mov) Player, 748
<applet> tag, 74, 798
applets, 2, 787
accessing URLs and correct protocol handlers, 486
Applet class, 789
AppletContext interface, 796
appletviewer, 441, 803
applications versus, 789
attributes, 798
AudioClip interface, 746
converting, 804
digital signatures, 806-815
dynamic web page content, adding, 787
embedding in HTML documents, 452, 792
HeartBeat applet (example), 452
history of, 787
HTML tags, problems with, 804
IE, 805
images, 795
inter-applet communication, 796
JApplet class, 788-803
JAR files, listing in ARCHIVE attribute, 74
Java Plug-in, using, 803-805
Java Web Start, 806
life cycles of, 790
loading class files, 801
methods, summary of, 797
package names, 802
parameters, 799
persistence and navigation, 797
resources, getting, 414, 794
security, 79, 789, 793
short-term applet persistence, 797
Swing-based, using JApplet (example), 791
syntax, complete, 800
system properties, limiting access to, 376
threads, 258, 261
trusted, 793
viewing Plug-in applets, 805
web browser treatment of, 799
application programming interfaces (see APIs)
application-level exceptions, 109
application-level security, 17, 19
applications, 29
Ant, 540-543
applets versus, 68, 789
appletviewer, 803
calculators, 457, 683
classes, 32
client-side, Java use in, 788
colors, setting, 55
components, 52
constructors, 44
containers, 52
DoodlePad (example), 718
embeddable, 22
exceptions, 63
GUIs, writing for, 31
HelloJava, 30-41
HelloJava2, 42-49
HelloJava3, 49-58
HelloJava4, 58-65
hierarchies (classes), 38
ImageProcessor, 742
interfaces, 48
Java Servlets API, 27
JComponent class, 38
layout of, 53
listener interfaces for, 54
multithreading in, 14
packages and import statements, 39
rmiregistry, 470
Runnable interface, 61
running, 31, 62, 68-70
security restrictions, applying to, 79
servers, 501
standalone, 68
starting, 62
subclassing and subtypes, 54
synchronization, 64
testing for correct behavior with assertions, 115
applying
annotations, 212
applet plug-ins, 803-805
arrays, 121, 244
assertions, 116
Eclipse IDE, 867-872
rendering, 697
superclass constructors, 167
web services, 549
apply-templates tag (XSL), 858
apt tool, 212
arbitrary-precision numbers, 344
architecture
CORBA, 474
Java, 4
ARCHIVE attribute, 74
archive attribute, 800
archives, JAR files, 74-78
ARGB (alpha RGB) color model, 736
arguments
annotations, 212
command-line, 33
declaring for methods, 35
instance variables versus, 43
numbers, 318
references, 136
types, 240
variable-length lists, 140
arithmetic expressions, 342
arithmetic utilities, 342-346
ArithmeticException class, 342
arraycopy( ) method (System class), 122
arrays, 13, 56, 118-124
{ } construct, using, 120
animation, use in, 733
anonymous, 122
Array class, 207
ArrayIndexOutOfBoundsException, 121
ArrayStoreException, 181
base type of, 91, 118
byte, 301
ByteArray class, 427
copying string characters into, 305
encoding, 301
of characters, 301
classes, 124, 181
collections, 354, 358, 364
creating and initializing, 119
deltas (animation), 733
generics, 243-246
image data, updating, 738
other Java objects versus, 118
length of, 57, 118, 121
multidimensional, 123
new operator, 118
objects, 56
raw data, creating data buffer from, 740
references, 13, 56, 91
of strings, 69
triangular, 124
types, 244
unchecked exceptions and, 110
ascent and descent (fonts), 706
ASCII, Unicode character compatibility, 84
asList( ) method, 358
aspersions, casting, 166
assertions, 115-118
applying, 116
enabling and disabling, 116
helper methods for, 117
asShortBuffer( ) method, 426
assignment
+= operator, 92
expressions, 101
local variables, 135
operators used in, 100
roles to users, 528
asyncExecute( ) method, 470
atomic operations, 280, 295
attach( ) method, 477, 481
attachment( ) method, 481
attributes
align (HTML), 800
<applet> tag, 798
applets, 798
ARCHIVE, 74
archive, 800
code (HTML), 798, 800
default for color and font, setting in components, 691
defining, 844
name (HTML), 801
objects, 798, 800
session, getting and setting, 515
sets, 635
XML, 819
xmlns, 821
audio
images, 746
loading clips for applets, 794
players for, 748
AudioClip interface, 746
authentication
users, 530
web applications, 528
@Author annotation, 212
auto-correction (Eclipse IDEs), 873
autoboxing primitive types, 139
available( ) method
FileInputStream class, 409
InputStream class, 394
availableCharsets( ) method, 428
AWT (Abstract Window Toolkit), 41, 49, 569, 884
double buffering and, 714
early problems with, 788
graphics context, acquiring, 690
update( ) method, 713
AWT Robot, 583
AWTKeyStroke class, 638
B[ Top ]
backing store (for preferences), 378
BackingStoreException, 378
BadExpression exception, 651
base directory, URL name and, 468
base type of arrays, 91, 118
base URLs, 484, 801
baselines of fonts, 706
basic access modifiers, 178
BasicStroke class, 692, 702
BeanBox development environment, 774
BeanBuilder development environment, 774
BeanInfo
customizing, 775-778
interface, 753, 775
beans, 753, 779
hand-coding with, 778-784
NumericField, 770
state, 757
(see also JavaBeans)
Beans class, 779
BeanShell script, 211, 876-881
classpath, changing, 881
commands, 878
interfaces and adapters, 880
online user's manual and FAQ, 881
Beans.instantiate( ) method, 774
Berners-Lee, Tim, 817
big endian, 427
BigDecimal class, 344
BigInteger class, 344
binary search trees, 365
bind( ) method
Naming class, 466
ServerSocketChannel class, 481
binding
JavaBean properties, 763-765
JAXB, 851-856
overriden methods and, 160
static methods, 160
black-and-white images, 740
BlockingQueue interface, 361, 367
blocks
initializer, 146
nonstatic code, 146
<body> tag, 821
Booleans, 43
blinkState variable, 62
parsing, 311
property values, 769
system property, getting, 376
BorderLayout, 666-668
borders, Swing components, 598-600
Border interface, 598
BorderFactory class, 598
Borders class (example), 599
implementation classes, 598
BOTH constant, 676
boundaries, words, 329
bounds
generics, 230-232
lower, 234
wildcards, 233
Box class, 669
boxing primitive types, 139
BoxLayout, 669
break statements, 97, 98
browsers, 5
access to user filesystem, 412
building, using JEditorPane HTML display, 632
CA certificates, 809
caching, 150
content and protocol handlers, 488
displaying, 22
driving browser with, 795
editors, using in, 633
HotJava web, 20, 412
HotJavaBrowser Bean, 752
Java, support for, 803
lacking cookie support, rewriting URLs for, 516
POST method, 510
redirecting to different URL, 509
responding to unknown tags, 799
running in context of, 789
support for, 787
XML, 818, 862
XSL in, 862
(see also interfaces)
bsh JAR files, 876
bubbling up (exceptions), 107
BufferedImage class, 734
creating from ARGB pixel values array, 736
Rasters and ColorModels, 735
updating, 738
BufferedImageOp interface, 741, 744
buffering
BufferedReader class, 395
capacity of buffers, 425
double
2D API, 714
animations and, 731
images, 712
images, 690
input/output streams, 391
logging messages, 381
NIO packages, 423
servlet response data, 540
StringBuffer class, 402
wrapper classes for, 397
building
Ant-based Eclipse IDE examples, 872
JavaBeans, 766-773
build.xml files, 541
bundles (resources), 309
business logic, representing with Session Beans, 785
ButtonGroup class, 590, 592, 604
buttons
action commands, getting and setting, 586
BorderLayout, adding to, 667
CardLayout, adding to, 671
colors, setting with pop-up menu, 604
columns, spanning, 677
composite layout, positioning in, 683
FlowLayout, adding to, 664
GridBagLayout, sizing, 675
GridLayout, arranging in, 666
images on, 587
radio, 592, 604
rows, spanning, 677
Swing, 586-590
byte arrays, 301
ByteArray class, 427
copying string characters into, 305
encoding, 301
(see also arrays)
Byte class, 311
byte streams, 392
character streams, converting, 394
piped, creating, 400
(see also streams)
ByteArrayOutputStream class, 403, 540
ByteArrrayInputStream class, 403
ByteBuffer class, 424, 426
ByteChannel interface, 424
bytecode, 4
compiled Java, 4
HotSpot interpreter, 6
verifier for, 17
ByteOrder class, 427
C[ Top ]
-c (create) option (jar utility), 75
caching
object references, garbage collection and, 149
servlet response output stream, 540
calculating column and row weights, 680
calculator application, creating, 457, 683
Calculator class, 686
Calculator.java, opening, 870
calendars
Calendar class, 202
GregorianCalendar class, 346
SpinnerCalendarModel class, 597
SpinnerDateModel class, 596
subclasses of, 346
Callable interface, 282
callbacks, interfaces as, 171
cancel( ) method, 477
canRead( ) method, 408
canWrite( ) method, 408
capacity of buffers, 425
capture
groups in regular expressions, 330
wildcards, 242
CardLayout, 663, 670
case
case-insensitive pattern matching, 332
checking strings for equivalence, 302
in constant names, 130
converting in strings, 305
strings, 318
casting
aspersions, 166
explicit, 165
generics, 225
Graphics object reference to Graphics2D reference, 691
implicit, 165
overloaded and overridden methods, effects on selection, 160
catch clause, 63
control, transferring out of method, 113
empty, 64
catch statements, 106
catching exceptions, 14
C/C++ programming languages
access permissions for classes, violating, 16
array type declarations in C, 118
C++, complexity of, 3
C scalar types, 87
errors in C, 103
fragile base class problem in C++, 12
Java, comparison to, 7
local variables, failing to initialize, 136
memory management, 13
multiple inheritance in C++, 155
static data typing, 11
CDATA (character data) sections, 821
cells
editing, 645
noneditable, 646
overflow, 644
certificates, 21
CA, 808, 884
signed applet, getting information about, 812
user (signer), 810
CGI (Common Gateway Interface), 491
chaining
constructors, 145
exceptions, 111
method calls, 101
changeColor( ) method, 57
ChangeListener interface, 596
channels
FileChannel class, 429
selectable, 475
SelectableChannel interface, 475
ServerSocketChannel class, 481
character data (CDATA) sections, 821
character encodings, Latin-1 (ISO 8859-1), 888
characters
char data type, 84, 87
classes, 327, 328
converting, 317
delimiter, 315
encoders/decoders, 428
escapes in regular expressions, 326
foreign languages, 446
literals, 90
reading from files, 410
removing from StringBuffer, 307
shapes representing (glyphs), 696
spacing, 328
streams, 394
uppercase, 318
words, 328
writing to files, 411
characters( ) method, 823
charAt( ) method
CharSequence interface, 427
String class, 301, 305
CharBuffer class, 426
CharSequence interface, 427
Charset class, 428
CharsetDecoder class, 429
CharsetEncoder class, 429
checkAll( ) method, 728
checkboxes, 590
checked exceptions, 109
checkError( ) method, 399
checkID( ) method (MediaTracker), 728
.class construct, 378
Class Not Found error, 66
classes, 5, 563-569
2D API, 689
drawing, 712-720
filling shapes, 700
fonts, 702-707
navigating, 693-700
printing, 720
rendering pipelines, 691-693
stroking shapes, 702
viewing images, 707-712
AbstractFormatter, 626
AbstractTableModel, 645
ActionEvent, 46, 590
adapters, 580
anonymous, 190
AdjustmentEvents, 615
AlphaComposite, 427, 692
anonymous inner classes, 182, 188
ArithmeticException, 342
arrays, 124
AWTKeyStroke, 638
BasicStroke, 692, 702
Beans, 779
BigDecimal, 344
BigInteger, 344
Box, 669
BufferedImage, 734
creating from ARGB pixel values array, 736
Rasters and ColorModels, 735
updating, 738
ButtonGroup, 590, 592, 604
Byte, 311
ByteArrayInputStream, 403
ByteArrayOutputStream, 403
ByteBuffer, 424, 426
ByteOrder, 427
Calculator, 686
characters, 327
CharBuffer, 426
CharsetDecoder, 429
CharsetEncoder, 429
Class, 198-200
class instances, 126
ClassCastException, 165, 487
ClassNotFoundException, 199
CloneNotSupportedException, 196
ClosedChannelException, 430
CoderResult, 429
Collator, 303
Color
implementing Paint interface, 692
obtaining system properties, 376
SystemColor subclass, 701
compilation units and, 174
compiler, working with, 10
components, 565
ConcurrenthashMap, 370
ConcurrentLinkedQueue, 370
ConsoleHandler, 381
Constructor, 201, 206
constructors, 44, 201
CyclicBarrier, 292
DataBuffer, 735, 740
DataBufferByte, 735
DataInputStream, 391, 396, 442
DataOutputStream, 442
DateFormat, 350
DefaultFocusTraversalPolicy, 637
defining, 170
DirectColorModel, 736
directories, 522
Document, 622
creating from styled text, 635
multiple text components, 630
setDocumentFilter( ) method, 628
text components, 630
documentation, creating with javadoc, 85
DocumentBuilderFactory, 832
DOMUtil, 833
Element, 832
Ellipse2D, 694, 699
enabling/disabling assertions for, 116
encapsulating data, 56
EnumMap, 371
EnumSet, 371
EOFException, 412, 460
EventHandler, 782
events, 46
EventSetDescriptor, 776
Exception, 107
exceptions for, 104
ExecutorHttpd, 284
extending, 36
Field, 201
fields, methods, and constructors, 201
FileChannel
concurrent access, 430
direct data transfers, 432
file locking, 431
MapMode static inner classes, 432
transferTo( ) method, 482
FileHandler, 381
FilterBypass, 628
finding with java interpreter, 71
FindResources, 414
Float, 694
FloatBuffer, 426
focus, 561
Font, 703
FontRenderContext, 704
foreground, 562
friendly (C++), 178
fully qualified names, 68
Future, 283
GeneralPath, 734
generics, 216-219
arrays, 243-246
bounds, 230-232
casts, 225
Enum class, 246
erasure, 220
methods, 238-243
parameterized type relationships, 223-225
raw types, 221
sort( ) method, 247
wildcards, 232-238
writing, 226-230
getName( ) method, 561
getParent( ) method, 561
Graphics, 694
Graphics2D, 702, 731
GregorianCalendar, 346, 348
GridBagConstraints, 672
HashMap, 368
HashSet, 366
HelloComponent, 36
hierarchies, 38
HttpdConnection, 481
HttpServletResponse
sendError( ) methods, 537
setting content type and getting writer classes, 508
HttpServletResponseWrapper, 537
HttpSession, 515
HyperlinkEvent, 632
Hypnosis, 731
IllegalArgumentException, 207
IllegalStateException, 359
ImageIcon, 587
ImageIO, 729
images, 723
importing, 176
incremental development of, 12
indexColorModel, 740
InetAddress, 454
InetSocketAddress, 481
inheritance, 10, 37
inner, 583
InputEvent, 575
InputVerifier, 628, 771
instance variables, 43
InstantiationException, 199, 207
interfaces and, 49
InternalFrameEvent, 653
InternalFrameListener, 653
InterruptedException, 64, 256, 728
IntrospectionException, 776
introspector, 775
ItemEvents, 590
JApplet, 788-803
Java API, 298
in Java applications, 32
Java security model for, 16
java.awt.event.InputEvent, 574
JavaBeans versus, 779
JButton, 49
action commands, 587
events generated by, 54
icons, creating for, 587
properties, displaying in NetBeans, 758
JCheckBox, 590, 592
JColorChooser, 620
JComboBox, 592, 594
JComponent, 37, 555, 576
Component class versus, 713
GUI Beans, inheritance from, 758
listenerList member variable, 661
setBorder( ) method, 598
setDoubleBuffered( ) method, 714
validating data with InputVerifier, 628
JDesktopPane, 652
JEditorPane, 632
JFC, 26
JFileChooser, 618, 620
JFormattedTextField, 625
filtering input, 626
format-specifying objects, 626
validating, 629
JFrame, 31-34, 562-567
animation, 733
modifying, 567
movies, 748
sizing, 566
JLabel, 31, 34
JList, 594
JMenu, 600
JMenuBar, 604
JMenuItems, 602
JOptionPane, 615
JPanel
layout managers for, 664
sizing, 565
JPasswordField, 616, 629
JPopupMenu, 604
JScrollBar, 614
JScrollPane, 595, 608, 613
application displaying large images, 609
fitting JTextArea within, 625
ImageIcons, wrapping in, 610
JSlider, 614
JSplitPane, 610
JTabbedPane, 611
JTextComponent, 622-627
JTextField, 616
JTextPane, 635
JToolBar, 634
JTree, 638-643
KeyboardFocusManager, 637
KeyEvent, 46, 603
KeyStroke, 603
LayoutFocusTraversalPolicy, 637
LineMetrics, 707
LinkWriter, 540
ListIt, 410
ListModel, 594
ListResourceBundle, 309
loaders, 10, 17, 796
loading, 18, 468, 801
locking, 65
LongBuffer, 426
Manager, 748
MapMode, 432
MappedByteBuffer, 432
MaskFormatter, 626
MediaTracker, 727, 729
MemoryHandler, 381
MessageBoard, 387
Method, 201, 204
methods, 561
MissingResourceException, 309
NullPointerException, 351
Object, 193-198
object design, 126-132
ObjectOutputStream, 416, 439
packaging images with applications, 708
ParseException, 111, 351, 398
PipedInputStream, 391
PipedWriter, 391
preferences for, 378
PrinterJob, 721
PropertyResourceBundle, 309
Proxy, 209, 784
ProxySelector, 450
RandomAccessFile, 411, 429
Raster, 735
DataBuffers and SampleModels, 735
static methods, 740
Reader, 391
Rectangle2D, 694
ReferenceQueue, 150
relationships, 154
arrays, 181
inheritance and subclassing, 154-169
inner classes, 182-192
interfaces, 169-174
packages, 174-178
visibility, 178-181
RemoteException, 104
RMISecurityManager, 468
RuntimeException, 64, 104
SampleModel, 740
scalability of, 15
Scanner, 337
SecurityException, 447
SecurityManager, 793
SelectionKey, 475
ServerSocketChannel, 475
ServletRequest, 507
Short, 311
SimpleAttributeSet, 635
SimpleElement, 829
SimpleFormatter, 382
SocketChannel, 475, 482
in source code files, 72
static members, 55
StatusImage( ), 727
streams (java.io package), 389
String, 305
StringBuffer, 306
StringBuilder, 306
StringTokenizer, 313, 651
subclasses and, 180
SwingUtilities, 585, 655
System
exit( ) method, 258
input/output and errors, 392
<T>, 229
Thread, 250
ThreadGroup, 277
ThreadLocal, 271
TimeZone, 348
top-level, 182
Transformer, 835
TreeMap, 366
TreeSet, 366
UIManager, 655
UnicastRemoteObject, 463
UnknownHostException, 438
URL, 484-490
URLEncoder, 491
Vector, 354
visibility, 175
WeakHashMap, 371
WorkRequest, 457, 470
wrapper, 137
Writer, 391
XMLDecoder, 830
XMLEncoder, 830
XMLReader, 824
(see also inner classes)
classesServletException, 508
CLASSPATH environment variables, runtime errors, 66
classpaths, 68, 70-72, 748
BeanShell, 881
clear( ) method
DrawPad class (example), 720
Preferences class, 378
resetting buffer position markers, 425
clearing sessions, 516
clearRect( ) method, 714
clients, 437, 459, 788
class files, making available via web server, 468
DateAtHost, 441
HelloClient servlet, 507, 525
input/output streams for reading/writing data, 507
for object-based servers, 459
remote object references, passing, 472
RMI, 466
servers, 437
sockets, 437
zero administration installations, 806
client-side cookies, 513
clipping
limiting drawing with, 715
shapes, 693-699, 712
clock applet (example), 260, 799
multiple instances, 801
parameters, 799
viewing, 800
clock display, updating every second, 354
Cloneable interface, 195
CloneNotSupportedException class, 196
cloning objects, 195
close( ) method
File class, 410
InputStream class, 394
PrintStream class, 540
Selector class, 478
ServerSocket class, 440
ClosedChannelException class, 430
closing I/O operations asynchronously, 423
closures, 182
code
attribute (HTML), 798, 800
formatting (Eclipse IDEs), 875
(see also syntax)
codebase, 80, 800
codec, 429
CoderResult class, 429
Cole, Brian, 553
collapsing nodes, 640
Collator class, 303
Collection interface, 355
collections, 354-374
arrays, 354, 358, 364
Collection interface, 355
Collections class, 369
compile-time safety, 357
for-loop over, 359
generics, 356
hash maps, 365
implementations, 363, 366
Iterator interface, 358
linked lists, 364
lists, 360
Map interface, 361
maps, 361
methods, 356
passing as method arguments, 122
read-only, creating, 370
runtime, 357
searching, 365
sets, 359
sorting, 372
synchronized and read-only collections, 369
trees, 365
types, 359
Color class, 55
implementing Paint interface, 692
static members, 56
system properties, obtaining, 376
SystemColor subclass, 701
ColorConvertOp operator, 741
colors
ARGB, 736
desktop (SystemColor class), 701
filling shapes with, 700
gradients, 701
indexes, 735
models, 735
predefined, 55
red text, creating attributes for, 635
rendering operations on, 693
rules for, 692
solid, 700
columns
formatting, 644
obtaining, 646
reordering, 645
spanning, 677
weights, calculating, 680
(see also tables)
combo boxes
ComboBoxModel class, 594
creating (example), 593
editable, 595
Swing, 592-595
comma operator (,) in C, 95
command-line arguments, 33
command-line tools, 30, 67
commands
action, 586, 592
BeanShell script, 878
grep (Unix), 432, 840
javap, 71, 220
patterns, 458
troubleshooting, 65
wscompile, 544
(see also functions, XPath)
comment( ) method, 839
comments, 43, 84
doc, 85
javadoc, 85
nesting, 85
XML, 819
(see also text)
Common Gateway Interface (CGI), 491
Common Object Request Broker Architecture (CORBA), 474
Comparable interface, 372
Comparator interface, 372
comparator( ) method, 362
compare( ) method, 303
compareTo( ) method, 303, 305
comparing
colors to system colors, 702
constant enumerations, 131
hash keys, 367
strings, 302
compilation units
interfaces and, 181
packages, 174-178
compilers
customizing, 161
Java interpreter and, 67
javac, 31
resolving method overloading, 142
compile-time safety, collections, 357
compiling
inner classes, 190
Java bytecode, 4
CompletionService, 286
complex types (XML), 848
componentAdded( ) method, 687
components, 558
anchoring, 680
classes, 565
DragImage (example), 712
glue, 669
GUI, 556
absolute positioning of, 687
acquiring directly from, 691
architecture, 885
bindable properties, 766
borders, 598-600
buttons and labels, 586-590
checkboxes and radio buttons, 590
Component class, 38, 52
custom, 656-661
data models, 647
Dial component (example), 657
dialogs, 615-621
file selection, 618
generating events, 656
HTML text in, 589
image observer, acting as, 710
JavaBeans as, 752
JComponent class, 38
JTable constructor, 643
lists and combo boxes, 592-595
menus, 600-604
MVC framework, 661
pluggable L&F, 653-656
pop-up menus, 604-608
Printable interface, implementing, 722
setBounds( ) method, 738
size of, 663
sliders, 613-615
spinners, 595-597
text, 622-637
TextLayout class, 637
HelloComponent, 36
sizing, 595
stacking, 564
strut, 669
Swing, 52, 555-562, 586, 622
desktops, 652
tables, 643-652
views, 631
composite layouts, 683
compositing colors, 693, 697
rules for, 692
transparency with AlphaComposite class, 700
compressing/decompressing data, 74
compression (data), 418-422
computer viruses, shielding classes from, 16
concat( ) method, 305
concatenating strings
+ operator, 100, 300
StringBuffer, implementing with, 307
toString( ) method, 193
concatenation operator (+), 306
concurrency (threads), 280-297
ConcurrentHashMap class, 370
ConcurrentLinkedQueue class, 370
ConcurrentMap interface, 363, 366
ConcurrentModificationException, 370
Condition interface, 290
conditional source compilation, 10
conditional statements, 94
conflicting methods, 174
connect( ) method, 400, 482
connectionless protocols, 437
connections (URLs), managing, 487
ConsoleHandler class, 381
constants
BOTH, 676
color, modifying in SystemColor, 701
defining with static variables, 130
enumerations, 131
holding in static variables of classes, 55
HORIZONTAL, 676
NONE, 676
static final color values in Color class, 700
VERTICAL, 676
constraints
Calculator class (example), 686
fill (GridBagLayout), 675
GridBagConstraints class, 672
height and width, setting, 677
properties, 765
weighting, 678
Constructor class, 201, 206
constructors, 102
access, 206
calling other constructors from, 442
chaining, 145
ChoiceFormat class, 323
classes, 44, 201
color models, 738
DatagramPacket class, 455
Dial class (example), 660
for error messages, 111
File class, 405
IndexColorModel class, 741
inner classes and, 186
instance variable initialization and, 168
JTable class, 643
overloaded, 51, 144
remote object classes, 464
strings, 300
superclass, applying, 167
time and date, representing, 346
constructs
.class, 378
synchronization, 291
consume( ) method, 651
consumption, thread resources, 279
ContainerListener interface, 565
containers, 563
Box, 626
buffering responses, 509
Container class, 52
ContainerEvent class, 574, 687
EJB, 785
focus traversal policy, 637
generics, 215
JScrollPane class, 608
JSplitPane class, 610
JTabbedPane class, 611
layout managers, 53
preferred size of, 663
Swing, 562-569
troubleshooting, 215
wildcards, 233
contains( ) method, 305, 356
content
handlers, writing, 490
length, 510
panes, 567, 666
types, 540
ContentHandler class, 823
Content-Type headers, 508
continue statements, 98
ControllerListener interface, 749
controlling threads, 255
conventions, Swing, 571
converting
bytes to Unicode characters, 301
collections and arrays, 358
data types, 312
file paths to URLs, 408
floating-point types, 319
integers, 312, 319
numeric types, 318
primitive types, 318
strings, 301, 317
ConvolveOp operator, 741
cookies, 513-519
coordinates, 674, 692
copying
existing Graphics2D objects, 691
files using FileChannel, 433
objects, 195
source code for examples, 29
copyValueOf( ) method, 305
CORBA (Common Object Request Broker Architecture), 474
core Java APIs, 26
classes, finding with interpreter, 71
packages, 40
CountDownLatch, 291
country codes, 308
covariants
subtypes, 244
typing, 162
create (-c) option (jar utility), 75
create( ) method
EventHandler class, 782
Graphics2D class, 691
createNewFile( ) method, 408
createShape( ) method, 733
createTempFile( ) method, 408
cryptography
checksums (JAR file manifests), 76
digital signatures and certificates, 21
encryption algorithms, using BigInteger, 345
generating key pairs with keytool, 810
public-key, 808
rot13 encryption algorithm, 403
currency, formatting with NumberFormat class, 321
currentColor( ) method, 57, 62
customizers (JavaBeans), 757-759
customizing
BeanInfo, 775-778
compilers, 161
enumerations, 152
generics, 216-219
arrays, 243-246
bounds, 230-232
casts, 225
Enum class, 246
erasure, 220
methods, 238-243
parameterized type relationships, 223-225
raw types, 221
sort( ) method, 247
wildcards, 232-238
writing, 226-230
JavaBeans, 759, 778
properties information, getting, 775
Swing, 656-661
cut( ) method, 625
cutting, copying, and pasting text, 624
cyclic color gradients, 701
cyclic references, garbage collection and, 148
CyclicBarrier class, 292
D[ Top ]
d (definition of line terminator) flag, 332
-d (directory) option (javac), 73
-D option (Java interpreter), 450
daemon threads, 69, 257
dashing, shape outlines, 702
data compression, 418-422
datafile types (images), 708
data models
DefaultTreeModel interface, 639
JSpinner component, 595
lists and combo boxes, 593
nodes, adding, 643
separation from views (components), 661
spreadsheet, 648, 651
tables, 645
text components, 622, 624
TreeModel interface, 639
trees, 638
data transport (secure), 529
data types, 86
arrays, 118
boolean, 884
buffer, 426
byte, 884
casting, 884
checking for, 181
class fields, accessor methods for, 203
double, 89, 345
float, 89
floating-point, 88, 138, 342
image storage, 738
integers, 43, 88
interface, 169
Java runtime interpreter, handling, 4
long, 89
objects at runtime, determining, 103
preferences, accessor methods for, 377
primitive, 56, 87, 890
random values, generating for, 345
reading/writing with Datastreams, 397, 456
reference, 90
shadowed variables, changing in, 157
short, 138
state of, 18
strings, 92
subtypes, subclassing and, 155
variables
classes, 35
declaration and initialization, 88
web services, 546
DataBuffer class, 735, 740
DataBufferByte class, 735
datagrams
packets, 454
sockets, 451-456
DataInput interface, 397
DataInputStream class, 391, 396, 442
DataOutputStream class, 442
DataSource interface, 784
DateAtHost client, 441
DateFormat class, 350
dates and times
creating new instance of, 207
DateAtHost client (example), 441
DateFormat class, 308, 346, 626
date-formatted HTTP header fields, 494
DateRequest class, 457
getHours( ) method, 102
toString( ) method, 260
utility classes, 346-353
days, setting, 347
deallocating memory, 13
debugging, 10
code for, including in source code, 161
output stream contents using list( ), 375
(see also troubleshooting)
declarative security constraints, 528
declaring
abstract classes, 168
arrays, 56, 118
classes, 126
filters, 535
instance variables, 43
interface, 170
scope, 182
decode( ) method, 429
decoding
characters, 428
request parameters, 512
decompressing data, 420
deep copies, 197
default classpaths, 71
default constructors, 144
default property values, 374
DefaultFocusTraversalPolicy class, 637
DefaultMutableTreeNode interface, 639
defaultReadObject( ) method, 417
defining
classes, 170
web services, 544
definition of line terminator (d) flag, 332
delete( ) method, 408
deleteOnExit( ) method, 408
deleting characters from string buffers, 307
delimiter characters, 315
delta arrays (animation), 733
-depend option (javac), 73
deployment
descriptors (EJB), 786
WAR files, 505, 521-532, 542
web services, 548
@Deprecated annotation, 212
@deprecated annotation, 86
deprecated methods, 85
dereference operator (*) in C, 100
design
objects, 125
classes, 126-132
creating, 143-147
destroying, 147-150
enumerating, 150-153
methods, 132-143
patterns
JavaBeans, 24, 752, 769
NetBeans, 826
desktops
colors, 701
Swing, 652
destination images, 744
destroy( ) method
Applet class, 791
ThreadGroup class, 277
destroying objects, 147-150
development environments, 28
NetBeans IDE, 754
visual design limitations, 774
(see also IDEs)
development history, 25
dialogs
confirmation, 615
Swing, 615-621
diff'ing files (Eclipse IDEs), 874
digests, message, 889
Digital Signature Algorithm (DSA), 813
digital signatures, 21
applets, 793, 806-815
certificates, 808, 814
identity verification and, 808
JAR files, storing in META-INF directory, 76
keystores, keys, and certificates, 813
keytool utility, 810
public and private keys, 813
public-key cryptography, 807
signed classes, 893
signing JARs, 814
digits, 328
direct buffers, 424
allocating, 427
FileChannel data transfer methods, use in, 432
direct color models, 735
direct data transfers, 432
DirectColorModel class, 736
directories
classes, 522
in classpaths, 70
extracting individual from JAR file, 76
META-INFdirectory, 76
in pathnames, 405
directory (-d) option (javac), 73
disabling assertions, 116
display policies for scrollbars, 608
displaying (see viewing)
doc comments, 85
DOCTYPE declarations, 845
Document class, 622
creating from styled text, 635
multiple text components, 630
setDocumentFilter( ) method, 628
text components, 630
Document Object Model (see DOM)
Document Type Definitions (see DTDs)
DocumentBuilderFactory class, 832
DocumentFilter interface, 626
documents, filters, 627
(see also XML)
doGet( ) method, 506-508
ShoppingCart class (example), 518
ShowSession servlet (example), 515
doHead( ) method, 507
doLayout( ) method, 564, 663
DOM (Document Object Model), 818, 831-836
JDOM, 889
domains
names, 520
objects, 38
DOMUtil class, 833
DoodlePad application (example), 718
doPost( ) method, 518
dot operator (.), 101, 128
dot-separated naming hierarchy (properties), 374
double buffering, 714, 731
double data types, 89, 345
doubleValue( ) method, 322
do/while statement, 94
dragging the mouse (events), 46
DragImage component (example), 712
draw( ) method, 691, 694
drawImage( ) method, 710, 738
DrawPad class, 720
Graphics2D class, 692, 709
sizing and scaling images, 711
drawing, 689
animations, 731
fonts, 702-707
images, 696
limiting with clipping, 715
navigating, 693-700
offscreen, 718
rendering pipelines, 691-693
shapes, 41, 694
filling, 700
stroking, 702
techniques, 712-720
text, 696
viewing, 707-712
drawString( ) method, 41, 692, 704, 706
DSA (Digital Signature Algorithm), 813
DTDs (Document Type Definitions), 382, 822, 844
dummy adapters, 582
duplicate elements, prohibition in sets, 359
dynamic binding, 160
dynamic class loading, 468
dynamic image updating, 738
dynamic interface adapters, 209
dynamic memory management, 13
dynamic web page content, 787
dynamically typed languages, 86
E[ Top ]
early-binding programming languages, 12
EchoService, 545
Eckstein, Robert, 553
Eclipse IDE, 29, 865-867
applying, 867-872
features, 872-875
importing Java, 867
editing
cells, 645
strings, 304
editors
in browsers, 633
Editor class, 618
EditorKit classes, 633
HTML and RTF documents, displaying, 632
JavaBean properties, 758
JTextArea and JTextField, 622
EJB (Enterprise JavaBeans), 27, 785
Element class, 832
elements
accessing with [ ] index operator, 118
attributes of, 819
JDOM, retrieving with, 836
matching to XSL templates, 857
root element, 820
XML, 819
Elliott, James, 553
Ellipse2D class, 694, 699
<EMBED> tag (HTML), 804
embeddable applications, 22
empty interfaces, 173
empty tags, 819
enabling
assertions, 116
GUIs, 560
XInclude, 842
encapsulation, 15, 56
encode( ) method, 429, 493
encodeURL( ) method, 516
encoding
byte arrays, converting to strings, 301
characters, 428
HTML form information, 511
schemes, 392
text, 83
UTF-8, 820
XML documents, 820
encrypting/decrypting messages, 807
end styles, shape outlines, 702
endElement( ) method, 823
end-of-line characters, matching in regular expressions, 332
endsWith( ) method, 305
Enterprise JavaBeans (see EJB)
entities, XML, 820
entity beans, 785
Enum class, 246
enum values, 151
enumerate( ) method, 277
enumerations
constants, comparing, 131
customizing, 152
objects, 150-153
switch statements, 97
Thread.State, 273
EnumMap class, 371
EnumSet class, 371
environments, 29
development, 754, 774
BeanBox, 774
BeanBuilder, 774
(see also IDEs)
EOFException class, 412, 460
equality
= = operator, 100, 302
identity vs., 55
equals( ) method, 367
Objects class, 194, 368
String class, 302, 305
UnicastRemoteObject class, 463
equalsIgnoreCase( ) method, 302, 305
equivalence
comparing strings for, 302
of hash code keys, 367
erasure, 220, 231
errors
compile-time, unreachable statements as, 99
Error class, 105
handling with exceptions, 14
image preparation, testing for, 728
messages, formatting with ChoiceFormat, 323
pages (web applications), 526
unchecked exceptions and, 110
(see also troubleshooting)
escape sequences, Unicode characters, 84
EventHandler class, 782
EventListener interface, 570
events, 45, 558, 571-580, 582, 640
action, 54
ActionEvent class, 586
bound properties and, 763
calculator application (example), 686
checkbox, 590
classes, 46
connecting Molecule Bean to Timer, 762
Dial component (example), 657, 660
hookups and adapters, 759-763
HyperlinkEvent class, 633
JavaBeans, 776
keyboard, 45
mouse-wheel, 575
multicasting, 573
players, realizing, 749
preference changes, notifying of, 379
SAX, 824, 829
sources, 572
Swing, 569-583
trees, 640, 643
types, 574
EventSetDescriptor class, 776
Exception class, subclassing, 107
exceptions, 63, 103-115
ArithmeticException class, 342
ArrayStoreException, 181
BackingStoreException, 378
BadExpression, 651
bubbling up, 107
catching, 14
chaining, 111
checked, 109
CloneNotSupportedException class, 196
ClosedChannelException class, 430
EOFException class, 412, 460
generics, 228
handling with try/catch statements, 63, 884
ignoring, 64
IllegalArgumentException class, 207
IllegalStateException class, 359
InstantiationException class, 199, 207
InterruptedException class, 256, 728
IntrospectionException class, 776
InvocationTargetException, 206
IOException, 104, 162, 412, 454
messages with, 111
MissingResourceException class, 309
NullPointerExceptions class, 351
NumberFormat Exception, 138
overriden methods, 162
ParseException class, 111, 351, 398
performance and, 114
RemoteException class, 104
runtime, 110
RuntimeException class, 64, 104
SecurityException class, 447
ServletException class, 508
threads, 277
throwing, 63, 110
TooManyException, 573
try creep, 112
unchecked, 109
UnknownHostException class, 438
UnknownServiceException, 485
Exchanger, 295
executables, building from source code, 10
execute( ) method, 458, 465
ExecutorHttpd class, 284
executors, 280
ExecutorService, 283
collective tasks, 285
scheduled tasks, 285
exists( ) method, 408
exit( ) method, 258
expanding and collapsing nodes, 640
explicit casting, 165
explicit types, generics, 241
exportNode( ) method, 378
exportObject( ) method, 464
exportSubtree( ) method, 379
expressions, 99, 650
assertion, evaluating, 115
assignment statements, 101
floating-point data types, 342
object creation, 102
order of evaluation, 92
XPath, 836-843
(see also regular expressions)
extending interfaces, 173
Extensible Markup Language (see XML)
Extensible Stylesheet Language (see XSL)
extent parameter, 615
extra paths, 510
F[ Top ]
-f (file) option (jar utility), 75
face (or font) names, retrieving, 704
factory methods, 135
factory patterns, 824
false values, 88
family names (fonts), 703
features of Eclipse IDE, 872-875
Field class, 201
fields, 32
access, 203
accessor methods, 126, 203
HTTP headers, 494
updating, 297
FileChannel class
concurrent access, 430
direct data transfers, 432
file locking, 431
MapMode static inner classes, 432
transferTo( ) method, 482
FileHandler class, 381
file (-f) option (jar utility), 75
files
bsh JAR, 876
build.xml, 541
diff'ing (Eclipse IDEs), 874
File class, 405
FileNotFoundException, 409
FileReader class, 410
fonts, 703
images, 708
input/output, 404-415
JAR, 74-78
localizing path with JFileDialog class, 406
locking, 423
memory, 423, 431
NetBeans, creating, 755
nonexistent on server, 487
RandomAccessFile class, 411
read-only, 412
read/write, 430
restricting access to, 447
source code, .java extension, 72
source files (Eclipse IDEs), 869, 875
streams, 391
uploading and removing with HTTP, 506
video, 748
WAR, 505, 521-532
Ant, 540-543
deployment, 505
web.xml, 522
welcome, 526
fill constraints (GridBagLayout), 675, 678
fill( ) method, 691
filling shapes, 693, 699
filter( ) method, 744
FilterBypass class, 628
filtering
AffineTransformOp class, 745
declaring, 535
documents, 627
FilterInputStream class, 397, 404
images, 741-746
input to formatted text components, 626, 628
mapping, 535
RescaleOp class, using, 745
servlets, 532-540
final modifier
combining with static modifier, 130
String class, 142
finalization, 148
finally clauses, 113
FindResources class, 414
fireEvent( ) method, 661
first( ) method
CardLayout class, 671
SortedSet class, 360
fixed delay, 286
fixed rate, 286
flags
ImageObserver interface, 725
interest set, for selection keys, 475
ready set, for selector keys, 476
in regular expression matching, 332
strings, 320
threads, using with, 256
windows from untrusted applications, 20
Flanagan, David, 8
flip( ) method, 425
Float class, 694
float data type, 89
FloatBuffer class, 426
floating-point data types, 88, 138, 319, 342
FlowLayout, 53, 664
flush( ) method
BufferedOutputStream class, 398
LinkWriter class, 540
object-based server and client, 460
Preferences class, 378
PrintWriter class, 399
focus, 570
interfaces, 576
navigation, 637
FocusEvent, 577
folds (Eclipse IDE), 870
Font class, 703
FontRenderContext class, 704
fonts, 702-707
baselines of, 706
family names, 703
FontShow application (example), 705
glyphs and, 696
leading space of, 707
metrics information, 704
names, retrieving, 704
properties files, 703
setting for Graphics2D objects, 692
style identifiers and point size, 704
for statements, 95
force( ) method
FileChannel class, 430
MappedByteBuffer class, 432
foreign languages (character encodings), 446
for-loops
collections, 359
enhanced for loops, 95
FORM method, 530
format( ) method, 350
Formatter object, 315
formatters for logging, 385
formatting, 875
ChoiceFormat class, 323
DateFormat class, 350
images, 736
MessageFormat, 323
NetBeans files/projects, 755
numbers, 312
objects, 102, 143-147
printf-style, 315-321, 352
shortcuts (Eclipse IDEs), 872
text, 311-315, 625
InputVerifier, using with, 629
JFormattedTextField class, 625
JPasswordField class, 629
forms
data, encoding/decoding, 494
shopping cart servlet (example), 518
forName( ) method, 199, 205, 210
forward key navigation, 638
Foundation, 552
fragments (XML), 820
frames, 565
applet visibility in, 791
keyboard focus navigation, 638
menu bars, adding to, 604
sizing, 34
frameworks
handlers, 489
JAF, 489, 784
JMF, 23
media, 747
MVC, 387, 558, 622, 631
web applications, 504
friendly classes (C++), 178
fully qualified names, 39, 68, 176
functions, XPath, 838
Future class, 283
G[ Top ]
garbage collection, 13, 147
gc( ) method (System), 148
GeneralPath class, 734
generators, random number, 345
generics, 216-219
arrays, 243-246
bounds, 230-232
casts, 225
collections, 356
containers, 215
Enum, 246
erasure, 220
event adapters, 782
exceptions, 228
methods, 238-243
parameterized type relationships, 223-225
raw types, 221
sort( ) method, 247
subclassing, 227
type information, accessing, 208
wildcards, 232-238
writing, 226-230
geographical locations, arranging components in windows by, 666
geometric shapes in 2D API, 694
geometric transformations, 745
GET method, 443, 490, 506
doGet( ), correspondence to, 507
HelloClient servlet, 508
matching with regular expression, 445
requests, handling, 511
security, adding, 495
ShowSession servlet, 515
get( ) method
Field class, 204
List interface, 360
Map interface, 362
get methods, 377
getAbsolutePath( ) method, 408
getActionCommand( ) method, 587, 592
getApplet( ) method, 796
getAppletContext( ) method, 795
getAttribute( ) method
Element class, 832
HttpSession class, 515
getAttributeNames( ) method, 515
getAudioClip( ) method, 794
getBackground( ) method, 62
getBundle( ) method, 309
getBytes( ) method, 305
getCanonicalPath( ) method, 408
getCause( ) method, 112
getChars( ) method, 305
getChild( ) method, 687
getClass( ) method, 378
Class class, 198, 414
Object class, 198
getClassName( ) method (StackTraceElement), 109
getCodeBase( ) method, 454, 794
getColumnName( ) method, 646
getComponents( ) method, 592
getConstructor( ) method, 207
getConstructors( ) method, 201
getContent( ) method, 486
getContentPane( ), 34
getContentPane( ) method, 34, 66, 568
getContents( ) method, 310
getCookies( ) method, 520
getCurrencyInstance( ) method, 321
getDate( ) method, 465
getDateInstance( ) method, 350
getDeclaredConstructors( ) method, 201
getDeclaredFields( ) method, 201
getDeclaredMethods( ) method, 202
getDocumentBase( ) method, 794
getDocumentElement( ) method, 834
getElementsByTagName( ) method, 832
getEventSetDescriptors( ) method, 776
getExtraPath( ) method, 511
getField( ) method, 204
getFields( ) method, 201
getFile( ) method, 620
getFileName( ) method (StackTraceElement), 109
getFilePointer( ) method, 412
getFirstElement( ) method, 834
getFont( ) method, 703
getHeight( ) method, 712
getIcon( ) method, 777
getImage( ) method, 726
Applet class, 794
Toolkit class, 708, 744
getImageLoadStatus( ) method, 729
getInputStream( ) method, 438
getInstance( ) method
Collator class, 303
DateFormat class, 350
NumberFormat class, 322
getInstanceOf( ) method, 779
getLineMetrics( ) method, 704
getList( ) method, 470
getLogger( ) method, 380
getMaximumSize( ) method, 663
getMediaTracker( ) method, 729
getMessage( ) method, 110
getMethod( ) (Method), 205
getMethod( ) method, 202
getName( ) method, 407
getNextEntry( ) method, 421
getNumber( ) method, 596
getNumberInstance( ) method, 322
getOppositeComponent( ) method, 577
getOppositeWindow( ) method, 577
getOutputStream( ) method, 438, 494, 508
getParameter( ) method, 510, 518, 794
getParameterNames( ) method, 512
getParent( ) method, 409
getPassword( ) method, 629
getPath( ) method, 409
getPercentInstance( ) method, 322
getPreferredSize( ) method, 595, 663
getProperty( ) method, 374
getPropertyDescriptors( ) method, 775
getProtocol( ) method, 485
getRequestURI( ) method, 513, 516
getResource( ) method, 74, 708, 794
getResourceAsStream( ) method, 794
getResponseCode( ) method, 494
getRGBdefault( ) method, 736
getRowCount( ) method, 646
getScaledInstance( ) method, 711
getSelectedText( ) method, 625
getSelectedValues( ) method, 594
getSelection( ) method, 592
getSession( ) method, 515
getSimpleElementText( ) method, 834
getSoTimeout( ) method, 448
getSource( ) method, 55
getStackTrace( ) method (Throwable), 109
getState( ) method, 273
getStringBounds( ) method, 704
getTargetException( ) method, 206
getTcpNoDelay( ) method, 448
getText( ) method, 624
getTimeInstance( ) method, 350
getValue( ) method, 518, 625
getValueAt( ) method, 646, 651
getWheelRotation( ) method, 576
getWidth( ) method, 712
getWriter( ) method, 508, 539
GIF (Graphical Interchange Format), 725
(see also images)
glue components, 669
glyphs, 696
Gosling, James, 1
goto statements (C/C++), 99
GradientPaint class, 701
gradients (colors), 701
Graphical Interchange Format (see GIF)
graphical user interfaces (see GUIs)
graphics, 689, 692
(see also images)
Graphics class, 41, 694
Graphics2D class, 702, 731
greediness in regular expression matching, 333
GregorianCalendar class, 346, 348
grep command (Unix), 432, 840
grid coordinates, 674
GridBagConstraints class, 672
GridBagLayout, 541, 672-687
GridLayout, 563, 665
group( ) method, 446
groups
regular expressions, 330
threads, 276-278
GUIs (graphical user interfaces), 552-577, 887
components, 556
enabling, 560
events and, 45
focus, 576
GUI beans, 757
HelloJava application, writing for, 30
hosts, 557
IDEs, 24
JApplet class, 788
Java, 788
JButton component, 49
layout managers, 662
multithreading in, 60
updating, 559
GZIP compression format, 418
GZIPInputStream class, 420
GZIPOutputStream class, 418
H[ Top ]
handlers
frameworks, 489
URLs, 488
hardcoding with beans, 778-784
hardware implementations of Java, 4
hash code values, 367
hash maps (collections), 365
hash tables
creating (example), 415
hash codes, storing in, 195
Hashtable class, 355
Map interface, 362
in object cloning, 196
properties, 374
hashCode( ) method, 365, 368
Object class, 194
String class, 305
HashMap class, 368
HashSet class, 366
hasMoreElements( ) method, 359
hasMoreTokens( ) method, 314
hasNext( ) method, 358
headers
Content-Type, 508
HTTP
fields, 494
HEAD and doHead( ) methods, obtaining with, 507
responses, 494
height
GridBagConstraints, 677
height attribute (HTML), 798
lines of text, 707
HelloClient servlet, 507, 525
HelloComponent class, 36
HelloJava, 30-41
HelloJava2, 42-49
HelloJava3, 49-58
HelloJava4, 58-65
help systems for Java programs, 27
helper methods for assertions, 117
hexadecimal numbers, 89, 312
hierarchies, applications, 38
high-level synchronization constructs, 280
HLS (hue, lightness, saturation), 735
hookups for JavaBeans, 782
horizontal boxes, creating, 669
HORIZONTAL constant, 676
horizontal orientation, scrollbars and sliders, 615
hostnames, 437, 484
hosts, GUIs, 557
HotJava web browser, 20, 412, 887
HotSpot virtual machine
adaptive compilation, 6
advanced garbage collection, 13
HSV (hue, saturation, value), 735
HTML (Hypertext Markup Language), 816
<body> tag, 821
Converter utility, 804
embedding applets in, 452
forms
adding to servlet output, 512
data, encoding/decoding, 494
GET and POST encoding, using with, 511
name/value pairs (fields), 490
frames, maintaining applet visibility in, 791
naming applets within, 796
printing contents of, 485
tags, 74, 890
text in buttons and labels, 589
transforming XML document to, 859
XHTML, 823
XSL stylesheets
applying, 860
creating, 859
HTTP (Hypertext Transfer Protocol)
HEAD requests, 507
HttpServlet class, 506
HttpServletRequest class, 507
HttpServletResponse class, 507
HttpSession class, 514
responses, 494, 509
servers, modern version for, 447
XML, combining with for web services, 862
HTTP Secure Socket Layer (HTTPS) protocol, 495
HttpdConnection class, 481
HTTPS (HTTP Secure Socket Layer) protocol, 495
HttpServletResponse class
sendError( ) method, 537
setting content type and getting writer, 508
HttpServletResponse encodeURL( ) method, 516
HttpServletResponse objects, 509
HttpServletResponseWrapper class, 537
HttpSession class, 515
hue, lightness, saturation (HLS), 735
hue, saturation, value (HSV), 735
HyperlinkEvent class, 632
hypertext links to class documentation, 85
Hypertext Markup Language (see HTML)
Hypertext Transfer Protocol (see HTTP)
Hypnosis class, 731
I[ Top ]
icons
ImageIcon class, 729
JavaBeans, supplying for, 777
in option dialogs, 617
identifiers for images (MediaTracker), 728
identities
database of, 813
testing with = = operator, 302
identity operator (= =), 55, 368
IDEs (integrated development environments)
Eclipse, 865-867
applying, 867-872
features, 872-875
GUIs, 24
JavaBeans, 752
NetBeans, 754-757
pure-Java, 67
IE (Internet Explorer)
applets, 805
HTML tags for, 804
(see also browsers)
if/else statement, 94
ignoring exceptions, 64
IllegalArgumentException class, 207
IllegalStateException class, 359
ImageIcon class, 587
ImageIO class, 729
ImageIO write( ) method, 746
ImageObserver interface, 709, 725
ImageProcessor application, 742
images, 723
adding to tab in JTabbedPane, 612
audio, 746
black-and-white, 740
BufferedImage class, 734
buffering, 690
on buttons, 587
converting Image to BufferedImage, 744
creating, 736
destination, 744
displaying with HTML tag, 589
double buffering, 712
drawing, 696
files, 708
filtering, 741-746
Image class, 708
ImageComponent class, 609
ImageProcessor application (example), 742
loading, 724-730
observers, 709, 725, 727
preloading, 711
printing, 720
producing data, 730-741
RescaleOp class, using, 745
RGB, 734
saving, 746
scaling, 711, 745
Swing, 714
updating, 738
viewing, 707-712
width of, 726
imageUpdate( ) method, 725
implementing
collections, 363, 366
Web services, 543-551
implements clauses, 170
implicit casting, 165
import projects dialog box, 868
import statements
BeanShell, 878
Eclipse IDEs, 875
importing
classes, 176
Java to Eclipse IDEs, 867
packages, 45
static import facilities, 177
importPreferences( ) method, 379
incrementaldraw property, 710
index operator ([ ]), 118
IndexColorModel class, 740
indexes
arrays, 56, 119
ArrayIndexOutOfBoundsException, 121
incrementing, 57
multidimensional arrays, 123
colors, 735
pages (web applications), 526
indexOf( ) method, 304
indirection, 137
InetAddress class, 454
InetSocketAddress class, 481
infinite loops, 60, 63
infinity, 343
inheritance, 154-169
abstract methods and classes, 168
in classes, 10
method overloading and, 143
multiple, 155
in objects, 126
private modifiers and, 155
single, 49, 155
init( ) method
Applet class, 454, 790
Servlet class, 505
initialize( ) method, 737, 740
initializer blocks, 146
initializing
arrays, 56, 119
constructors, 168
local variables, 135
inner classes, 182-192, 583, 888
as adapters, 184
compiling, 190
creating adapter classes with, 184
limitations on, 187
within methods, 186
scoping of this reference, 190
security, 191
static methods, 187
input streams
DataInputStream class, network byte order and, 442
InputStream class, 389
InputStreamReader class, 395
properties, loading from, 375
server request processing, 459
URLs, retrieving from, 485
InputEvent class, 575
InputEvents class, 574
input/output (see I/O)
InputVerifier class, 628, 771
insert( ) method, 307
insertNodeInto( ) method, 643
insertString( ) method
Document class, 635
DocumentFilter class, 628
insets
GridBagLayout, 681
specifying, 564
installing
Java applications locally, 806
NetBeans IDE, 754
instanceof operator, 100, 103, 166, 181, 459
instances, 34
creating with constructor methods, 44
documents, 843
instance methods, 127
instantiating new, 199, 206
methods, 127, 204
variables, 127, 415
assigning value to, 45
constructor chaining and, 168
default values, 43
wrapper classes, 138
instantiate( ) method, 779
instantiation, 232
InstantiationException class, 199, 207
integers, 43
arithmetic, Java support for, 342
array of, declaring, 119
converting, 312, 319
data types, 43, 88
int data type, 89
integer literals, 88
intValue( ) method, 138
in Java switch statements, 96
parsing in alternate number bases, 312
system property, getting, 376
integrated development environments (see IDEs)
interactive TV (ITV), 3
interest set (selector key flags), 475
interestOps( ) methods, 477, 481
interfaces, 10, 169-174, 557, 565, 570, 575
ActionListener, 54, 606
implementing, 570, 580
object registration, 556
program registration, 586
adapter classes and, 184
AudioClip, 746
BeanInfo, 753, 775
BeanShell, 880
BlockingQueue, 361, 367
BufferedImageOp, 741, 744
ByteChannel, 424
Callable, 282
CGI, 491
ChangeListener, 596
CharSequence, 427
Cloneable, 195
Collection, 355
Comparable, 372
Comparator, 372
compilation units and, 181
ConcurrentMap, 363, 366
Condition, 290
ContainerListener, 565
ControllerListener, 749
DataInput, 397
DataSource, 784
DefaultMutableTreeNode, 639
defining, 169
DocumentFilter, 626
dynamic adapters, 209
empty, 173
EventListener, 570
extending, 173
focus, 576
ImageObserver, 709, 725
Iterator, 358
java.rmi.Remote, 545
JAXB, 853
JNDI, 27
Lock, 288
Map, 361
multiple inheritance in Java, 10
naming, 170
NavigationFilter, 626
NodeChangeListener, 379
Observer, 387
Paint, 692
Player, 748
PreferenceChangeListener, 379
public modifiers, 170
Queue, 366
ReadWriteLock, 289
reference types and, 91
remote, 462
RemoteObject, 463
Runnable, 61, 250, 354
subclassing, 253
Thread class, 250
threads, 251
Serializable, 415
SortedMap, 362, 366
ThreadFactory, 288
Throwable, 109
TreeNode, 639
TreeSelectionListener, 640
variables, 172
visibility and, 180
(see also GUIs)
intern( ) method, 303, 306
internal frames, creating in DesktopPane, 652
internalFrameClosing( ) method, 653
InternalFrameEvent class, 653
InternalFrameListener class, 653
internationalization, 27, 308-311
button labels, 587
date/time formats, 351
Locale class, 308
resource bundles, 311
Internet Explorer (see IE)
Internet Protocol (IP), 437
interpreters, Java, 5, 67
classpaths, specifying, 71
runtime, 4
security manager, installing, 79
system properties, access to, 69
interrupt( ) method
Thread class, 255, 257
UpdateApplet class, 260
InterruptedException class, 64, 256, 728
IntrospectionException class, 776
Introspector class, 775
invalidate( ) method, 516
invisible Beans, 762, 772
InvocationTargetException, 206
invoke( ) method
InvocationHandler class, 210
Method class, 204, 206
invoking methods, 102
I/O (input/output), 389
applets and, 412
asynchronous I/O, 422
buffers, 424
channels, 423
data compression, 418-422
dialogs, 615
files, 404-415
filtering, 626
network, 436
NIO package, 422-433
performance and, 423
scaleable I/O with, 474-482
streams, 389-404
IOException, 104, 162, 412, 454
IP (Internet protocol), 437
isAbsolute( ) method, 406, 409
isAcceptable( ) method, 477
isCommitted( ) method, 510
isConnectable( ) method, 477
isDirectory( ) method, 406, 409
isEmpty( ) method, 356
isError( ) method, 429
isErrorID( ) method, 728
isFile( ) method, 406, 409
isHidden( ) method, 409
isLoggable( ) method, 386
isNaN( ) method, 343
isPopupTrigger( ) method, 606
isReadable( ) method, 477
isSelected( ) method, 592
isShared( ) method, 431
isSupported( ) method, 428
isUnderflow( ) method, 429
ItemEvents class, 590
Iterator interface, 358
iterator( ) method, 356
iterators
Enumeration interface, 359
in greedy matching, 333
Iterator interface, 184
maps, 363
MyStringIterator class (example), 471
for ready set, 478
regular expression, 329
statements, 94
StringIterator class, 470
ITV (interactive TV), 3
J[ Top ]
J2ME (Java 2 Micro Edition), 28
JAF (Java Activation Framework), 489, 784
JAI (Java Advanced Imaging), 729
JApplet class, 788-803
embedding in GUI, 789
paint( ), 789
JAR (Java Archive) files, 74-78
digital signatures for applets, 793
file compression, 74
JAR manifests, 76
jar utility, 75
jarsigner, 814
JavaBeans, 766
JMF, 748
magicbeans.jar (demo Beans), 755
making files runnable, 77
packing, 75
unpacking, 76
Java, 83
2D API, 26
3D API, 27
API, 298
applets, 22
architecture, 4
assertions, 115-118
comments, 84
Cryptography API, 27
development history, 25
Eclipse IDE, importing to, 867
exception handling, 106
history of, 2
interpreters, 4, 450
JAXP, 823
JDOM, 835
Media API, 27
multimedia, 23
online information about, xvii
operators, 100
Plug-in, 788
portability of code, 4
scripting languages, 211
Security, 26
Servlets API, 27
software development models, 24
Version 5.0, 26
web services, APIs related to, 862
Web Start, 22, 806
Web, use of, 21
XML APIs, 818
Java 2 Enterprise Edition (J2EE), 786
Java 2 Micro Edition (J2ME), 28
Java 2 platform
GUIs, emphasis on, 2
Printing API, 720
Java Activation Framework (see JAF)
Java Advanced Imaging (JAI), 729
Java API for XML Binding (see JAXB)
Java Archive files (see JAR files)
java command, troubleshooting, 65
Java Database Connectivity (see JDBC)
Java Development Kit (JDK), xiv
Java Foundation Classes (JFC), 26
java interpreter, 888
Java Media Framework (see JMF)
Java Naming and Directory Interface (JNDI), 27
Java Network Launching Protocol (JNLP), 806
Java Reflection API, 200-203
Java Server Pages (JSP), 503
Java Web Services Developer's Pack (JWSDP), 851
Java WSDP, 497
java.awt package, 41
java.awt.event package, 45
java.awt.event.InputEvent class, 574
java.awt.geom package, 694
java.awt.image package, 723
java.awt.print package, 721
JavaBeans, 751
architecture, 752
BeanContext and BeanContextServices, 784
BeanInfo, customizing, 775-778
binding, 763-765
building, 766-773
component architecture, 888
customizers, 757-759
customizing, 759, 778
design patterns, 24, 752, 769
development environment (NetBeans IDE), 754-757
EJB, 785
event hookups and adapters, 759-763
events, 776
form data, validating, 770
hardcoding, 778-784
hookups for, 782
IDEs, 752
installing and running, 754
instantiation and type management, 779
JavaBeans class, 24
limitations of, 774
objects, 751-753
properties, 757-759
reflection, 210
serialization, 774, 830
Swing, 751
java.beans.beancontext package, 784
javac command, troubleshooting, 65
javac compiler, 72
-D option, 376
O option, 161
Javadoc annotations, 211-213
JavaHelp API, 27
java.io package, 389
java.lang package, 41, 105
java.lang.reflect package, 200
JavaMail API, 27
java.math package, 344
java.net package, 41, 434, 436
java.net.InetAddress class, 455
java.nio package, 389
javap command, 71, 220
javap tool, 191
java.rmi package, 104
java.rmi.Remote interface, 545
java.text package, 321-325
java.util.concurrent package, 280, 361
java.util.concurrent.atomic package, 295
java.util.logging package, 379
java.util.Observer interface, 387
java.util.regex API, 335
javax.media package, 748
javax.media.protocol package, 748
javax.servlet package, 501-507
javax.servlet.http package, 506
javax.swing package, 40, 552
javax.swing.tree package, 638
javax.xml.validation API, 849
JAXB (Java API for XML Binding), 851-856
JAXP (Java API for XML Processing), 824
JButton class, 49
action commands, 587
events generated by, 54
icons, creating for, 587
properties, displaying in NetBeans, 758
JCheckBox class, 590, 592
JColorChooser class, 620
JComboBox class, 592, 594
JComponent class, 37, 555, 576
Component class versus, 713
GUI beans, inheritance from, 758
listenerList member variable, 661
setBorder( ) method, 598
setDoubleBuffered( ) method, 714
validating data with InputVerifier, 628
JDBC (Java Database Connectivity), 26, 889
JDesktopPane class, 652
JDK (Java Development Kit), xiv
JEditorPane class, 632
JFC (Java Foundation Classes), 26
JFileChooser class, 618, 620
JFormattedTextField class, 625
filtering input, 626
format-specifying objects, 626
validating, 629
JFrame class, 31-34, 562-567
animation, 733
modifying, 567
movies, 748
sizing, 566
Jini API, 27
JLabel class, 31, 34
JList class, 594
JMenu class, 600
JMenuBar class, 604
JMenuItems class, 602
JMF (Java Media Framework), 23, 747
JNDI (Java Naming and Directory Interface), 27
JNLP (Java Network Launching Protocol), 806
join( ) method, 255
JOptionPane class, 615
Joy, Bill, 1
JPanel class
layout managers for, 664
sizing, 565
JPasswordField class, 616, 629
JPopupMenu class, 604
JScrollBar class, 614
JScrollPane class, 595, 608, 613
application displaying large images, 609
fitting JTextArea within, 625
ImageIcons, wrapping in, 610
JSlider class, 614
JSpinner component, 595-597
JSplitPane class, 610
JSPs (Java Server Pages), 503
JTabbedPane class, 611
JTextComponent class, 622-627
JTextField class, 616
JTextPane class, 635
JToolBar class, 634
JTree class, 638-643
jugglers, 760
justifying text, 317
just-in-time compilation, 6
JWDSP (Java Web Services Developer's Pack), 851
JWindow, 565
K[ Top ]
key values (hash codes), 367
KeyboardFocusManager class, 637
keyboards, 556
events, 45
shortcuts
copying, pasting, and cutting text, 624
menus, 601
mnemonics for, 603, 758
KeyEvent class, 46, 603
KEYGEN extension to HTML, 810
keys( ) method, 478
keys, modifiers, 574
keySet( ) method, 362
keystores, 813
KeyStroke class, 603
keytool
generating public/private key pairs with, 813
user interface awkwardness, 811
keywords
assert, 115
class, 126
extends, 37
interface, 169
interfaces, 174
return, 132
synchronized, 15, 370
void, 132
Knudsen, Jonathan, 637
L[ Top ]
labels
combining with JavaBeans, 773
frame windows, creating with JLabel, 34
JLabel class, 588
split panes, 610
swing, 586-590
tick marks in sliders, 615
languages
codes, 308
strings, 303
last( ) method, 671
lastIndexOf( ) method, 304, 306
lastModified( ) method, 407, 409
late-binding programming languages, 12
layout managers, 563, 662-664
BorderLayout, 666-668
BoxLayout, 669
CardLayout, 670
FlowLayout, 664
GridBagLayout, 672-687
GridLayout, 665
nonstandard, 687
SpringLayout, 688
LayoutFocusTraversalPolicy class, 637
Lea, Doug, 281
leading spaces, 317, 707
leftmost bounds, 231
legacy code, 231
length( ) method, 409
CharSequence interface, 427
File class, 407, 409
RandomAccessFile class, 412
String class, 101, 300, 306
length of arrays, 118, 121
levels, logging, 382
lexical comparison of strings, 303
L&Fs (look-and-feels), 26, 653, 655
life cycle of applets, 790
lightweight components (Swing), 889
limit and value pairs for numerical ranges, 323
limitations
on inner classes (in methods), 187
of JavaBeans, 774
of parameter types, 222, 229
of serialization, 460
of XML, 830
LineMetrics class, 707
lines (shape outlines), 692, 702
linked lists, 137, 364
links
generating with LinkResponseFilter (example), 538
HyperlinkEvent class, 632
responding to, 633
LinkWriter class, 540
Linux, support for Java, 28
Lisp programming language
dynamic data typing, 11
Java, comparison to, 7
list( ) method, 409
File class, 407
Properties class, 375
List<Date>, 224
listeners, 46
ActionListener interface, 586
ChangeListener interface, 596
ContainerListener interface, 687
InternalFrameListener interface, 653
maintaining list of, 661
MouseWheelListener, 575
registering for menu items, 603
selectors, 475
tree events, 640
listening for components, 565
listFiles( ) method, 409
ListIt class, 410
ListModel class, 594
List<Object>, 224
ListResourceBundle class, 309
listRoots( ) method, 406, 409
lists, 138
enumerations, converting into, 359
implementation classes, 366
List interface, 360
object type collections, converting to, 358
sorting, 372
SpinnerListModel, 596
Swing, 592-595
variable-length argument, 140
literals (characters), 90
little endian, 427
load( ) method, 375
loaders, classes, 10, 17
loadFile( ) method, 620
loadFromXML( ) method, 375
loading
applet resources, 794
classes, 18, 468, 801
getImage( ) method, using, 708
images, 724-730
preloading, 711
progression, notifying of, 725
properties, 375
local variables, 43, 132, 135
Locale, 350
Lock interface, 288
lock( ) method, 431
locking, 280
classes, 65
files, 423
logging
API, 379-386
filters for, 381
handlers for, 381
levels, 382
levels, setting for, 381
loggers, 380
LogTest class (example), 383
methods for, 385
piped streams, using for, 401
setup properties, 384
<login-conf>, 530
logins, option dialog for, 616
long data type, 89
system property, getting, 376
toString( ), 312
LongBuffer class, 426
lookahead operator (?=), 334
look-and-feels (see L&Fs)
lookup( ) (Naming), 467
LookupOp operator, 741
loops
enhanced for, 95
for, 359
infinite, 60, 63
lower bounds, 234
lowercase names in properties sheets, 770
Loy, Marc, 553
M[ Top ]
m (multiline) mode, regular expression matching, 332
-m (manifest) option (jar utility), 77
MacOS L&F, 655
main( ) method, 30, 33, 44
applications in JAR file, 77
Dial class, 660
Java interpreter and, 68
MessageBoard class, 388
RMI
clients, 467
servers, 466
RMISecurityManager, 468
Main-Class value, adding to manifests, 77
make utility, 10, 73
makeMenuItem( ) method, 606
malloc in C/C++, 136
management
components, 565
dynamic memory, 13
layout managers, 662-664
BorderLayout, 666-668
BoxLayout, 669
CardLayout, 670
FlowLayout, 664
GridBagLayout, 672-687
GridLayout, 665
nonstandard, 687
SpringLayout, 688
pop-up menus (Swing), 607
text, 635
URL connections, 487
Manager class, 748
managers, 563, 564
manifest (-m) option (jar utility), 77
manifests (JAR files), 76
Bean classes in, 767
signature files and, 814
map( ) method, 432
MapMode class, 432
MappedByteBuffer class, 432
maps, 580
collections, 361
EnumMap class, 371
filters, 535
hash, 365
implementation classes, 366
Map interface, 361
patterns (URL), 524
SortedMap interface, 362
mark and sweep technique, 148
mark( ) method, 398
markup languages, 816
marshaling objects to XML, 853
MaskFormatter class, 626
match attribute, XSL, 857
match( ) method, 446
Matcher, 336
matches( ) method, 306
matching regular expressions, 332
math utilities, 342-346
java.math package, 344
Math class, 342
methods, 343
media frameworks, 747
MediaTracker class, 727, 729
members
class
inheritance, 155
static initializer blocks, 147
static, 55, 129
memory
allocating, 13
dynamic management, 13
MemoryHandler class, 381
memory-mapped files, 423, 431
menus
available L&Fs, creating, 654
DinnerMenu application (example), 601
JMenuBar class, 600
labels for, 602
pop-up, 606
PopupColorMenu application (example), 604
Swing, 600-604
MessageBoard class, 387
MessageFormat class, 323
<$nopages, 616
messages
dialogs, 615
passing, 266
metadata (Javadoc as), 86
META-INF directory, 76
Method class, 201, 204
methods, 33, 93, 567
accept( ) (ServerSocket), 437, 440, 445
access, 127, 204
accessor, 126, 203
actionPerformed( ), 54, 556, 592, 606, 624
activeCount( ), 277
add( ), 216
Calendar class, 597
Container class, 53
GridBagConstraints class, 673
List interface, 360
Set interface, 360
addCookie( ), 519
addElement( ), 139
addGB( ), 674, 686
addHeader( ), 509
addImage( ), 728
addMouseListener( ), 46
addMouseMotionListener( ), 48
addObserver( ), 387
addTab( ), 611
allocate( ), 427
append( ), 636
JTextArea, 624
StringBuffer class, 307
arraycopy( ) (System class), 122
asList( ), 358
asShortBuffer( ), 426
asyncExecute( ), 470
attach( ), 477, 481
attachment( ), 481
available( )
FileInputStream class, 409
InputStream class, 394
availableCharsets( ), 428
BeanShell, 879
Beans.instantiate( ), 774
bind( )
Naming class, 466
ServerSocketChannel, 481
ByteBuffer class, 426
cancel( ), 477
canRead( ), 408
canWrite( ), 408
chaining, 101
changeColor( ), 57
characters( ), 823
charAt( )
CharSequence interface, 427
String class, 301, 305
checkAll( ), 728
checkError( ), 399
checkID( ) (MediaTracker), 728
Class class, 201
classes, 561
clear( )
DrawPad class (example), 720
Preferences class, 378
resetting buffer position markers, 425
clearRect( ), 714
close( )
File class, 410
InputStream class, 394
PrintStream class, 540
Selector class, 478
ServerSocket class, 440
Collection interface, 356
comment( ), 839
comparator( ), 362
compare( ), 303
compareTo( ), 303, 305
componentAdded( ), 687
concat( ), 305
conflicting, 174
connect( ), 400, 482
consume( ), 651
contains( ), 305, 356
copyValueOf( ), 305
create( )
EventHandler class, 782
Grpahics2D class, 691
createNewFile( ), 408
createShape( ), 733
createTempFile( ), 408
currentColor( ), 57, 62
cut( ), 625
declaring, 64, 109
decode( ), 429
defaultReadObject, 417
delete( ), 408
deleteOnExit( ), 408
destroy( )
Applet class, 791
ThreadGroup, 277
doGet( ), 506-508
ShoppingCart class (example), 518
ShowSession servlet (example), 515
doHead( ), 507
doLayout( ), 564, 663
doPost( ), 518
doubleValue( ), 322
draw( ), 691, 694
drawImage( ), 710, 738
DrawPad class, 720
Graphics2D class, 692, 709
sizing and scaling images, 711
drawString( ), 41, 692, 704, 706
encode( ), 429, 493
encodeURL( ), 516
endElement( ), 823
endsWith( ), 305
equals( ), 367
Objects class, 194, 368
String class, 302, 305
UnicastRemoteObject, 463
equalsIgnoreCase( ), 302, 305
exceptions, declaring, 14
execute( ), 458, 465
exists( ), 408
exit( ), 258
exportNode( ), 378
exportObject( ), 464
exportSubtree, 379
factory, 135
File class, 406
fill( ), 691
filter( ), 744, 745
final methods, performance and, 160
fireEvent( ), 661
first( )
CardLayout class, 671
SortedSet class, 360
flips( ), 425
flush( )
bufferedOutputStream class, 398
LinkWriter class, 540
linkWriter class, 540
object-based server and client, 460
Preferences class, 378
PrintWriter class, 399
font metrics, obtaining, 707
force( )
FileChannel class, 430
MappedByteBuffer class, 432
FORM, 530
format( ), 350
forName( ), 199, 205, 210
gc( ) (System), 148
generics, 238-243
GET, 443, 506
HelloClient servlet, 508
matching with regular expressions, 445
requests, handling, 511
security, adding, 495
ShowSession servlet, 515
get, 377
get( )
Field class, 204
List interface, 360
Map interface, 362
getAbsolutePath( ), 408
getActionCommand( ), 587, 592
getApplet( ), 796
getAppletContext( ), 795
getAttribute( )
Element class, 832
HttpSession class, 515
getAttributeNames( ), 515
getAudioClip( ), 794
getBackground( ), 62
getBundle( ), 309
getBytes( ), 305
getCanonicalPath( ), 408
getCause( ), 112
getChars( ), 305
getChild( ), 687
getClass( ), 198, 378
Class class, 198, 414
getClassName( ) (StackTraceElement), 109
getCodeBase( ), 454, 794
getColumnName( ), 646
getComponents( ), 592
getConstructor( ), 207
getConstructors( ), 201
getContent( ), 486
getContentPane( ), 34, 66, 568
getContents( ), 310
getCookies( ), 520
getCurrencyInstance( ), 321
getDate( ), 465
getDateInstance( ), 350
getDeclaredConstructors( ), 201
getDeclaredFields( ), 201
getDeclaredMethods( ), 202
getDocumentBase( ), 794
getDocumentElement( ), 834
getElementsByTagName( ), 832
getEventSetDescriptors( ), 776
getExtrapath( ), 511
getField( ), 204
getFields( ), 201
getFile( ), 620
getFileName( ) (StackTraceElement), 109
getFilePointer( ), 412
getFirstElement( ), 834
getFont( ), 703
getHeight( ), 712
getIcon( ), 777
getImage( ), 726
Applet class, 794
Toolkit class, 708, 744
getImageLoadStatus( ), 729
getInputStream( ), 438
getInstance( )
Collator class, 303
DateFormat class, 350
NumberFormat class, 322
getInstanceOf( ), 779
getLineMetrics( ), 704
getList( ), 470
getLogger( ), 380
getMaximumSize( ), 663
getMediaTracker( ), 729
getMessage( ), 110
getMethod( ), 202
getName( ), 407
getNextEntry( ), 421
getNumber( ), 596
getNumberInstance( ), 322
getOppositeComponent( ), 577
getOppositeWindow( ), 577
getOutputStream( ), 438, 494, 508
getParameter( ), 510, 518, 794
getParameterNames( ), 512
getParent( ), 409
getPassword( ), 629
getPath( ), 409
getPercentInstance( ), 322
getPreferredSize( ), 595, 663
getProperty( ), 374
getPropertyDescriptors( ), 775
getProtocol( ), 485
getRequestURI( ), 513, 516
getResource( ), 74, 708, 794
getResourceAsStream( ), 794
getResponseCode( ), 494
getRGBdefault( ), 736
getRowCount( ), 646
getScaledInstance( ), 711
getSelectedText( ), 625
getSelectedValues( ), 594
getSelection( ), 592
getSession( ), 515
getSimpleElementText( ), 834
getSoTimeout( ), 448
getSource( ), 55
getStackTraceI( ) (Throwable), 109
getState( ), 273
getStringBounds( ), 704
getTargetException( ), 206
getTcpNoDelay( ), 448
getText( ), 624
getTimeInstance( ), 350
getValue( ), 518, 625
getValueAt( ), 646, 651
getWheelRotation( ), 576
getWidth( ), 712
getWriter( ), 508, 539
group( ), 446
hashCode( ), 365, 368
Object class, 194
String class, 305
hasMoreElements( ), 359
hasMoreTokens( ), 314
hasNext( ), 358
helper methods for assertions, 117
HttpServletResponse encodeURL( ), 516
ImageIO write( ), 746
imageUpdate( ), 725
importPreference( ), 379
indexOf( ), 304
init( )
Applet class, 454, 790
Servlet class, 505
initialize( ), 737, 740
inner classes within, 186
input, validating, 117
insert( ), 307
insertNodeInto( ), 643
insertString( )
Document class, 635
DocumentFilter class, 628
instance, 127, 204
instantiate( ), 779
interestOps( ), 477, 481
interface, 48, 170
intern( ), 303, 306
internalFrameClosing( ), 653
interrupt( )
Thread class, 255, 257
UpdateApplet class, 260
invalidate( ), 516
invoke( )
InvocationHandler class, 210
Method class, 204, 206
invoking, 102
isAbsolute( ), 406, 409
isAcceptable( ), 477
isCommitted( ), 510
isConnectable( ), 477
isDirectory( ), 406, 409
isEmpty( ), 356
isError( ), 429
isErrorID( ), 728
isFile( ), 406, 409
isHidden( ), 409
isLoggable( ), 386
isNaN( ), 343
isReadable( ), 477
isSelected( ), 592
isShared( ), 431
isSupported( ), 428
isUnderflow( ), 429
iterator( ), 356
JComponent, 561
join( ), 255
keys, 478
keySet( ), 362
last( ), 671
lastIndexOf( ), 304, 306
lastModified( ), 407, 409
late-binding in Java, 12
length( ), 409
CharSequence interface, 427
File class, 407, 409
RandomAccessFile class, 412
String class, 101, 300, 306
list( ), 409
File class, 407
Properties class, 375
listFiles( ), 409
listRoots( ), 406, 409
load( ), 375
loadFile( ), 620
loadFromXML( ), 375
lock( ), 431
main( ), 30, 33, 44
applications in JAR, 77
Dial class, 660
Java interpreter and, 68
MessageBoard class, 388
RMI clients, 467
RMI servers, 466
RMISecurityManager, 468
makeMenuItem, 606
map( ), 432
mark( ), 398
match( ), 446
matches( ), 306
Math class, 343
math utilities, 343
mkdir( ), 407, 409
mkdirs( ), 409
mouseDragged( ), 45, 48, 713, 717, 720
mouseMoved( ), 45
mousePressed( ), 606
native, 5
nativeOrder( ), 427
newAudioClip( ), 747
newCachedThreadPool( ), 284
newDecoder( ), 429
newEncoder( ), 429
newFixedThreadPool( ), 283
newInstance( ), 206
newSingleThreadExecutor( ), 284
next( ), 358
nextDouble( ), 346
nextElement( ), 359
nextGaussian( ), 345
nextToken( ), 314
node( ), 377
nodeExists( ), 378
notify( ), 264
notifyAll( ), 266, 270
notifyObservers( ), 387
Object class, 193
object design, 132-143
open( ), 476
openConnection( ), 488, 494
openStream( ), 485
order( ), 427
overlapping, 174
overloading, 142, 158, 216
overriding, 158
dynamic binding and, 160
exceptions, 162
return types, 163
overriding (see overriding methods)
pack( ), 663
paint( ), 690, 699
animation, use in, 733
Component class, 691
DrawPad class, 720
image observers and, 710
JApplet class, 789
update( ) method versus, 714
paintComponent( ), 37, 41, 47, 560, 660
HelloComponent class (example), 41
JComponent class, 38
parse( ), 322
parseInt( ), 455
passing collections as arguments, 122
play( ), 746
pointers to, Java elimination of, 14
PopupTrigger( ), 606
POST
requests, accepting, 512
using, 491
web browsers, 510
postData( ), 493
print( ), 721
printDialog( ), 722
println( )
PrintWriter class, 399
string buffers, 307
printStackTrace( ), 108
private, 56
propertyChange( ), 765
propertyNames( ), 374
public boolean offer( ), 361
public E peek( ), 361
public modifiers, 178
put( ), 361
putMessage( ), 268
putNextEntry( ), 420
Random class, 345
read( ), 169
FileChannel class, 430
FilterInputStream class, 404
InputStream class, 393, 439
LargerHttpd class, 481
PipedInputStream class, 400
RandomAccessFile class, 412
readDouble( ), 397
readLine( ), 395, 401
readObject( ), 416
readUTF( ), 397
readySet( ), 477
realize( ), 748
rebind( ), 466
regionMatches( ), 306
register( ), 477
remove( )
Collection interface, 356
DocumentFilter class, 628
Iterator class, 359, 478
List interface, 360-363
Map interface, 362
Preferences class, 378
SortedSet interface, 360
removeNode( ), 378
renameTo( ), 408
repaint( ), 47, 63, 559
animation, use in, 733
Component class, 691
image observers and, 710
limiting redrawing with, 715
progressive image updates, 725
UpdateApplet class, 259
replace( ), 307
DocumentFilter class, 628
String class, 306
replaceAll( ), 306
replaceFirst( ), 306
requestFocus( ), 561, 576
reset( )
Buffer class, 425
BufferedInputStream class, 398
resetBuffer( ), 510
resume( ), 255
revalidate( ), 564, 663
rewind( ), 425
round( ), 344
run( ), 251, 257, 585
HelloComponent4 class (example), 61
object-based servers, 459
Thread class, 61
TinyHttpConnection class, 445
sameFile( ), 485
save( ), 375
saveFile( ), 620
say( ), 262
schedule( ), 354
seek( ), 412
select( ), 477
selectAll( ), 625
selectedKeys( ), 477
selecting, 161
selection among, 161
selectNow( ), 477
sendError( ), 509, 537
sendMessage( ), 454
sendRedirect( ), 509
serialization, 262
service( ), 506
set( ), 204, 360
setActionCommand( ), 587
setAttribute( ), 515
setBorder( ), 598
setBound( ), 775
setBounds( ), 663
setBufferSize( ), 510
setChanged( ), 388
setComposite( ), 692
setContentPane( ), 568
setContentType( ), 508
setContraints( ), 673
setDaemon( ), 257
setDisplayName( ), 777
setDocumentFilter( ), 628
setDomain( ), 520
setDoOutput( ), 494
setDoubleBuffered( ), 714
setEchoChar( ), 629
setFocusable( ), 561
setFocusLostBehavior( ), 626
setFocusTraversalKeys( ), 638
setFont( ), 588
Component class, 624, 704
Graphics2D class, 704
setHeader( ), 509
setInt( ), 204
setJMenuBar( ), 604
setjmp( ), 103
setKeepAlive( ), 449
setLastModified( ), 409
setLayout( ), 662
setLocale( ), 350
setMaximumPriority( ), 277
setPaint( ), 692
setProperty( ), 376, 450
setReadOnly( ), 409
setRequestMethod( ), 494
setRequestProperty( ), 494
setRGB( ), 738
setSoLinger( ), 449
setSoTimeout( ), 448
setStream( ), 797
setStroke( ), 692, 702
setTcpNoDelay( ), 448
setText( ), 589, 624
setValue( ), 771
class, 625
Dial class, 660
setValueAt( ), 650
shadowing, 158
shapes, 694
shapes, drawing and filling, 694
show( ), 606, 671
showConfirmDialog( ), 616
showDialog( ), 621
showDocument( ), 795
showMessageDialog( ), 616
showOpenDialog( ), 620
showStatus( ), 795
shutdownOutput( ), 449
signature, 69
size( )
Collection class, 356
FileChanel class, 430
Map interface, 362
skip( ), 394
sleep( ), 63, 255
sort( ), 247
split( ), 306
start( ), 62
Thread class, 251, 255, 454
UpdateApplet class, 259
startElement( ), 823
startsWith( ), 304, 306
static, 134, 160, 187
statusAll( ), 728
statusID( ), 728
stop( )
Thread class, 251, 255
UpdateApplet class, 259
storeToXML( ), 375
String class, 305
stubbed-out, 582
subMap( ), 362
subSet( ), 360
substring( ), 101, 305
sum( ), 651
super( ), 167
suspend( )
Thread class, 255
ThreadGroup( ), 277
systemNodeForPackage( ), 378
systemRoot( ), 377
term( ), 651
this( ), 168
Thread class, 255
timeStep( ), 733
toByteArray( ), 403
toCharArray( ), 301, 306
toHexString( ), 312
token( ), 651
toLowerCase( ), 306
toString( ), 302, 402
ByteArrayOutputStream class, 540
Integer and Long classes, 312
Object class, 193
String class, 306
StringBuffer class, 307
toUpperCase( ), 306
toURL( ), 409, 747
tracing to origin, 108
transferFrom( ), 432
translate( ), 692
trim( ), 304
truncate( ), 430
update( ), 387, 690
updateComponentTreeUI( ), 655
userNodeForPackage( ), 378
userRoot( ), 377
valueOf( ), 301, 306
values( ), 362
verifier( ), 9
verify( ), 629
vetoableChange( ), 765
virtual (C++), 159
visibility of, 178
wait( ), 255, 264
waitForAll( ), 728
waitofrID( ), 728
wakeup( ), 477
weakCompareAndSet( ), 297
workCompleted( ), 472
wrap( ), 427
write( )
BufferedOutputStream class, 398
LargerHttpd class, 481
OutputStream class, 439
PipedOutputStream class, 400
writeInt( ), 397
writeObject( ), 416, 460
yield( ), 276
Microsoft
applets, history of use, 788
C# language and .NET initiative, 3
IE, 28
Java version, problems with, 803
Word, use of RTF in documents, 633
(see also IE)
MIME types (Multipurpose Internet Mail Extensions), 486
DataSource, determining for data stream, 784
determining for servlet output, 508
MissingResourceException class, 309
mkdir( ) method, 407, 409
mkdirs( ) method, 409
mnemonics, 601, 758
modal dialogs, 616
mode of files (read/write), specifying, 411
models, colors, 735
Model-View-Controller framework (see MVC framework)
modification times, 73
modifiers, 574
abstract, 168
basic access, 178
InputEvents class, 574
interfaces
methods, 170
variables, 172
keys, 574, 638
private, 16, 41, 155
protected, 179, 196
public, 41, 128
combining with static modifier, 69
interface, 170
methods and variables, 178
security, 203
static (see static modifiers)
strictfp class, 88
synchronized, 57, 65, 144
transient, 415
visibility (see visibility modifiers)
modifying Swing, 585
monitors, 14, 261
Monson-Haefel, Richard, 785
months, setting, 347
mouse, 556, 569, 575, 582
events
DrawPad application (example), 720
getting x and y coordinates of position, 46
inner classes supplying handlers for, 720
MouseEvent class, 46
MouseMotionListener interface, 48, 54
pop-up menus and, 606
InputEvents class, 574
wheels, scrolling with, 575, 609
mouseDragged( ) method, 45, 48, 713, 717, 720
mouseMoved( ) method, 45
mousePressed( ) method, 606
mouse-wheel, 575
movies, 747
multicast sockets, 437
multicasting events, 573
multidimensional arrays, 123
multiline (m) mode, regular expression matching, 332
multimedia, 747
multiple inheritance, 155
multiplicity, 329
Multipurpose Internet Mail Extensions (see MIME types)
multithreading, 60
Swing, 584
MutableTreeNode interface, 639
MVC (Model-View-Controller) framework, 387, 558, 622, 631
N[ Top ]
Nagle's algorithm, turning off, 448
names
applets, 802
attribute (HTML), 801
binding/rebinding names to registry, 466
domains, 520
files, localization of, 406
fonts, 703
fully qualified, 39, 68
HTML frames for displaying documents, 795
inner classes, 186
Naming class, 464
packages, 175
remote interfaces, 465
Swing, 49
URNs, 483, 495
namespaces
XML, 821
XSL, 857
naming conventions
constructor methods, 44
JavaBeans, naming and design patterns, 24
packages, 39
Swing components, 49
NaN (not-a-number), 343
narrowing reference types, 165
native methods, 5
native threads, 275
nativeOrder( ) method, 427
navigating
2D APIs, 693-700
Eclipse IDEs, 870
focus, 637
NavigationFilter interface, 626
negative infinity, 343
negative lookahead operator (?!), 334
nesting
character classes, 328
comments, 85
expressions, parsing, 651
XML tags, 819
NetBeans
IDE, 754-757
get and set method patterns, recognition of, 770
patterns, 770
design, 826
properties, 769
Netscape
applets, history of use, 787
CA certificates, 809
signed applets, 811
viewing Plug-in applets with, 805
XML support (v. 6.x), 819
(see also browsers)
networking, 1, 434
byte order, 442
classes for (java.net package), 41
example, 465
exceptions, 104
nonblocking web server, 478
protocols, 456
remote and nonremote objects, 461
selectable channels, 475
sockets, 434, 436
TinyHttpd server (example), 443
new I/O package (see NIO package)
new operator, 34, 51, 101, 890
anonymous inner classes, 188
arrays, 118
multidimensional arrays and, 123
objects, creating, 127
newAudioClip( ) method, 747
newCachedThreadPool( ) method, 284
newDecoder( ) method, 429
newEncoder( ) method, 429
newFixedThreadPool( ) method, 283
newInstance( ) method, 206
newSingleThreadExecutor( ) method, 284
next( ) method, 358
nextDouble( ) method, 346
nextElement( ) method, 359
nextGaussian( ) method, 345
nextToken( ) method, 314
NFS servers, 413
NIO (new I/O) package
character encoders/decoders, 428
mapped and locked files, 423
nonblocking web server, 478
scalable I/O with, 474-482
No Class Def Found error, 66
node( ) method, 377
NodeChangeListener interface, 379
nodeExists( ) method, 378
nodes, 639
adding new into tree, 642
DOM, 832
expanding and collapsing, 640
packages, getting for, 378
XPath, 837
nonblocking I/O, 422, 474
client-side operations, 482
SelectableChannel interface, setting for, 475, 476
NONE constant, 676
noneditable cells, 646
nongreedy matching, 333
nonstandard layout managers, 687
nonstatic code blocks, 146
nonwhitespace, 328
not-a-number (NaN), 343
notify( ) method, 264
notifyAll( ) method, 266, 270
notifyObservers( ) method, 387
null values, 36, 890
character, 88
default value of array elements, 119
instanceof operator and, 103
maps and, 363
for reference types, 101
NullPointerExceptions class, 351
numbering capture groups, 331
numbers, 87
arbitrary-precision, 344
arguments, 318
floating-point, 89
formats for different countries, 312
instance variables, numeric, 43
NaN (not-a-number), 343, 890
Number interface, 138
NumberFormat class, 321, 626
NumberFormatException, 138
parsing, 311
randomly generated, 345
SpinnerNumberModel, displaying numeric values, 596
numeric types, converting, 318
NumericField bean, 770
O[ Top ]
Oaks, Scott, 15
<Object>, 236
<OBJECT> tag (HTML), 804
object-oriented programming
classes, 32
encapsulation of data, 15
polymorphism principle, 52, 54
scripting languages versus, 8
ObjectOutputStream class, 416, 439
objects
annotation, 211-213
arrays, 14, 56, 119, 181
attributes, 798, 800
Class class, 198-200
cloning, 195
constructors, 143
creating, 102, 143-147
design, 125
classes, 126-132
methods, 132-143
destroying, 147-150
domain, 38
enumerating, 150-153
equality versus equivalence, 194
Formatter, 315
getting URL content as, 486
graphics, 689
hash codes, 195, 368
HttpServletResponse, 509
initializer blocks, static and nonstatic, 146
input/output streams for, 391
JavaBeans, 751-753
locking, 65
methods and variables, accessing, 41
Object class, 37, 39, 193-198
paint, 693
primitive types as, 138
references, 13, 35, 91
reflection, 200-203
scripted (BeanShell), 879
serialization, 415-418, 456-461
servers, 457
unreachable, 148
value data, 546
observers
images, 725, 727
Observer interface, 387
octal numbers, 89
offscreen drawing, 714, 718
open( ) method, 476
openConnection( ) method, 488, 494
openStream( ) method, 485
operating systems
entries under operating system names, 70
virtual memory, 431
Windows, 71
operators
++, 100
, (comma), 95
+ (concatenation), 100, 300, 306
* (dereference) in C, 100
. (dot), 101, 128
= = (identity), 55, 302, 368
! (not), 63
| (OR), 844
[...] (range), 328
AffineTransformOP, 741
ColorConvertOP, 741
ConvolveOP, 741
images, 741
instanceof, 100, 103, 166, 181, 459
Java, 100
LookupOP, 741
overloaded, 92, 300
precedence of, 651
RescaleOP, 741
ternary, 62
optimizing code in JIT compilation, 6
option dialogs, 615
OR operator (|), 844
order( ) method, 427
order of evaluation, 93
output
data compression, 418-422
files, 404-415
network, 436
NIO package, 422-433
scalable I/O with, 474-482
streams, 389-404
ByteArrayOutputStream class, 540
network byte order, 442
properties table, saving to, 375
server response processing, 459
System.out and System.err, 393
writing preferences to, 378
(see also I/O)
overflow (cells), 644
overlapping methods, 174
overloading
append( ) method, 307
casting and, 166
constructors, 144
equals( ) method, 194
methods, 51, 142, 158, 216
overriding versus, 159
@Override, 159
@Override annotation, 213
overriding methods, 37, 158, 889
abstract methods, 168
component size, 663
dynamic binding and, 160
equals( ) method, 369
exceptions, 162
hashCode( ) method, 369
method selection and, 161
overloaded methods versus, 143
return types, 163
P[ Top ]
P2P (peer-to-peer) application, nonblocking client-side I/O, 482
pack( ) method, 663
Pack200 utility, 78
packages, 10, 128, 574
2D API, 689
drawing, 712-720
filling shapes, 700
fonts, 702-707
navigating, 693-700
printing, 720
rendering pipelines, 691-693
stroking shapes, 702
viewing images, 707-712
applets, 802
compilation units, 174-178
core, Java platform, 40
enabling assertions for, 116
importing, 40
java.math, 344
java.net, 436
java.text, 321-325
java.util.concurrent, 361
java.util.logging, 379
names, 175
NIO, 422-433
scalability and, 15
unnamed, 177
packets, datagram, 454
packing JAR files, 75
padding
GridBagLayout, 681
HTML attribute for, 800
lines of text, 707
Paint interface, 692
paint( ) method, 690, 699
animation, use in, 733
Component class, 691
DrawPad class, 720
image observers and, 710
JApplet class, 789
update( ) method versus, 714
paint objects, 693
paintComponent( ) method, 37, 41, 47, 560, 660
HelloComponent class (example), 41
JComponent class, 38
panels
applets as, 789
displaying multiple in BorderLayout, 668
Panel class, 38
panes, content, 567
parameters
applets, 799
extent, 615
generics, 219, 223-225
limitations, 222
servlets, 510
ShowParameters servlet, 511
tags, 799
tracking purchases in shopping cart application, 518
type limitations, 229
parent directory of a file, 407
parse( ) method, 322
ParseException class, 111, 351, 398
parseInt( ) methods, 455
parsing
DateFormat class, 350
with DOM, 831
equations, 648
methods for, 651
parser support for namespaces, 822
SAX API, using, 823
text, 311-315
URLs, 485
XML documents, 817
passing
arguments and references, 136
messages, 266
by reference, 461
by value, 91
passwords, 813
pathnames
creating File instances from, 405
localizing for filesystem, 405
resources, returning URL for, 413
RMI registry, 464
paths, 70
alternate, 377
extra, 510
relative, 405, 407, 802
tree selections, 640
URLs, 484
patterns, 325
alternation in, 331
commands, 458
factory, 824
JavaBeans, 24, 752, 769
mapping (URL), 524
NetBeans, 770
design, 826
properties, 769
regex, 335
pausing threads, 255
#PCDATA (character data identifier), 844
PDAs (personal digital assistants), 3
peer-to-peer (P2P) application, nonblocking client-side I/O, 482
performance, 1
applets and, 790
array bounds checking and, 6
boxing, 140
bytecode verification and, 17
collection synchronization and, 369
compilers, 161
double buffering images, 715
encryption and, 807
final methods and, 160
logging and, 380, 386
scaling images and, 711
threads, 278-280, 474
Perl scripting language, 8
permits, 291
personal digital assistants (PDAs), 3
PI (static final double value), 344
PipedInputStream class, 391
PipedWriter class, 391
pipelines, rendering, 691-693
pipes
pipe channels, 424
selectable channels, 475
pixels
arrays of values (Raster), 735
assigning RGB value, 737
colors, methods of representing, 734
PLAF, 654
play( ) methods, 746
Player interface, 748
pluggable L&F (Swing), 653-656
plug-ins
applets, 803-805
Java Plug-in, 788
Java Web Start, installing, 806
pointers
references versus, 13
untyped, violating class encapsulation, 16
policy files
creating with policytool, 80
using with default security manager, 81
policytool utility, 80
polling I/O operations for activity, 448, 475
polygons, drawing, 695
polymorphism, 142, 158
pop-up menus (Swing), 604-608
port numbers
exported objects, listening on random, 464
rules for using, 440
specifying for server, 455
portability
fonts, 703
Java
code, 4
to platforms and operating systems, 28
positioning
absolute, 687
components in containers, 662
markers in buffers, 425, 430
relative, 683
words, 329
positive infinity, 343
POST method
requests, accepting, 512
using, 491
web browsers, 510
post-conditions (validating method returns), 117
postData( ) method, 493
precision (text), 317
preconditions (method input validity), 117
predicates (XPath), 837
PreferenceChangeListener interface, 379
Preferences API, 376-379
preferred size of components, 595
preloading images, 711
preprocessor, lacking in Java, 10
presentation information, separating from structure, 816
primitive data types
arrays of, 56
boolean, 884
char, 884
converting between, 312
data input/output streams, reading/writing with, 397
double, 885
float, 886
int, 888
Java runtime interpreter, handling of, 4
long, 889
Math class methods, working with, 344
NIO buffers, 424
parsing, 311
short, 892
wrappers for, 206
primitive types
autoboxing and unboxing, 139
converting, 318
wrappers for, 137
print( ) method, 721
printDialog( ) method, 722
PrinterJob class, 721
printf-style formatting, 315-321
dates and time, 352
printing
2D API, 720
collection elements with Iterator, 358
LinkWriter class (example), 540
PrintWriter class, 399, 494
println( ) method
PrintWriter class, 399
string buffers, 307
printStackTrace( ) methods, 108
priority (threads), 271-276
private keys, 810
private modifiers, 16, 41, 155
problems area (Eclipse IDE), 870
procedural security, 531
processes, threads versus, 60, 250
producer threads, 266, 270
producing image data, 730-741
programming languages
Java, comparison with other, 7-9
methods, binding to definitions, 12
regular expressions, 326
type safety and method binding, 11
projects
import projects dialog box, 868
NetBeans, creating, 755
properties, 374-376
applet access, restrictions on, 376
BeanInfo interface, 775
classes implementing interfaces, 173
constraining, 765
constructing URL and loading configuration file with an applet, 794
default values, 374
Dial class (example), 766
editors for, 758
EventHandlers, 783
fonts, 703
incrementaldraw, 710
interpreter access to, 69
JavaBeans, 757-759, 763-765
loading and storing, 375
NetBean patterns, 769
read-only and write-only, 769
redrawrate, 710
system, 375
XML to Java conversions, 829
propertyChange( ) method, 765
PropertyChangeEvent class, 657, 762
adapter classes listening for, 765
notifying Beans of, 771
propertyNames( ) method, 374
PropertyResourceBundle class, 309
protected modifiers, 179, 196
protocols, 484
handlers, 487, 490
networking, 456
reliable, 436
serialization, 456-461
SOAP, 862
TCP (see TCP)
UDP, 451
provider packages, 810
Proxy class, 209, 784
proxy servers, 441
ProxySelector class, 450
public boolean offer( ) method, 361
public E peek( ) method, 361
public modifiers, 41, 128
combining with static modifier, 69
interface, 170
methods and variables, 178
public-key cryptography, 495
purchases, tracking in shopping cart servlet, 518
put( ) method, 361
putMessage( ) method, 268
putNextEntry( ) method, 420
Q[ Top ]
quantifiers, regular expression pattern matches, 329
Queue (as collection), 360
Queue interface, 366
Quit menu item, 601
quotation marks
in applet parameter names and values, 799
in strings, 303
in XML attributes, 820
R[ Top ]
radio buttons, 592
ButtonGroup class, 590
Cheese menu (example), using with, 604
DriveThrough application (example), 590
grouping with ButtonGroup class, 592
Swing, 590
random access, support by buffers, 426
random numbers, 345
random values, filling data image byte array, 741
RandomAccessFile class, 411, 429
range operator ([...]), 328
Raster class, 735
DataBuffers and SampleModels, 735
static methods, 740
raw types, 221, 236
read( ) method, 169
FileChannel class, 430
FilterInputStream class, 404
InputStream class, 393, 439
LargerHttpd class, 481
PipedInputStream class, 400
RandomAccessFile class, 412
readDouble( ) method, 397
Reader class, 391
reading locks, 289
readLine( ) method, 395, 401
readObject( ) method, 416
read-only collections, creating, 370
read-only files, 412, 769
readUTF( ) method, 397
read/write files, 430
read/write positions and limits within buffers, 424
ReadWriteLock interface, 289
readySet( ) method, 477
realize( ) method, 748
rebind( ) method, 466
Rectangle2D class, 694
recurring tasks, 286, 354
recursion, 651
red, green, and blue (see RGB)
redeployment of WAR files, 542
redrawrate property, 710
refactoring (Eclipse IDEs), 874
ReferenceQueue class, 150
references, 90
arguments, 136
arrays, 56, 91
calling methods in, 102
elements of array of objects, 119
finalizing objects, 148
garbage collection and, 148
method overloading and, 142
narrowing, 165
object serialization and, 415
objects, 13, 35, 91
passing arguments to methods, 136
super, 164
this, 144, 164, 190
weak, 149, 371
reflection, 14, 200-203
dynamic interface adapters, 209
JavaBeans, using in, 24, 752
methods, accessing, 769
runtime event hookups with, 782
security and, 783
uses of, 210
regionMatches( ) method, 306
register( ) method, 477
registry
applets using static methods for, 796
RMI, 464
regular expressions (and pattern matching), 325-341
capture groups, 330
characters and character classes, 327
escaped characters, 326
GET method, matching with, 445
greediness in matching, 333
groups, 330, 331
iterators, 329
java.util.regex API, 335
lookaheads and lookbehinds, 334
position markers, 328
special options, 332
strings, 306
reifiable types, 246
relationships
classes, 154
arrays, 181
inheritance and subclassing, 154-169
inner classes, 182-192
interfaces, 169-174
packages, 174-178
visibility, 178-181
generics, 223-225
wildcards, 237
relative paths, 405, 407, 802
relative positioning, 683
relative URLs, 484
constructing for loading applet resources, 794
(see also URLs)
reliable protocols, 436
reloading web applications, 526
remote interfaces
Remote interface, defining for RMI server, 465
WorkListener (example), 471
(see also interfaces)
remote method invocation (see RMI)
remote objects
implementing with UnicastRemoteObject, 463
stubs and skeletons, 462
remote procedure calls (RPCs), 461
RemoteException class, 104, 463
RemoteObject interface, 463
remove( ) method
Collection interface, 356
DocumentFilter class, 628
Iterator class, 359, 478
List interface, 360-363
Map interface, 362
Preferences class, 378
SortedSet interface, 360
removeNode( ) method, 378
renameTo( ) method, 408
rendering
applying, 697
clipping shape, limiting to interior of, 693
FontRenderContext class, 704
Graphics2D class, 731
hints, 693
RenderingHints class, 697
rescaling images, 745
pipelines, 691-693
shapes, 693
text, 696
transformations and, 696
reordering columns, 645
repaint( ) method, 47, 63, 559
animation, use in, 733
Component class, 691
image observers and, 710
limiting redrawing with, 715
progressive image updates, 725
UpdateApplet class, 259
replace( ) method, 307
DocumentFilter class, 628
String class, 306
replaceAll( ) method, 306
replaceFirst( ) method, 306
replacing text, 338
request and response objects
determining request type, 459
HttpServletResponse, 509
object-based servers, 457
servlets, 506, 535
requestFocus( ) method, 561, 576
RescaleOp operator, 741
reset facility, buffers, 424
reset( ) method
Buffer class, 425
BufferedInputStream class, 398
resetBuffer( ) method, 510
resources
application, loading, 413
bundles, 309
MissingResourceException class, 309
ResourceBundle class, 309
inter-applet communication, 796
responses, HTTP, 494, 509
resume( ) method, 255
retrieving font names, 704
return keyword, 132
return statements, 114
return types, overriden methods, 163
return values, 206
revalidate( ) method, 564, 663
rewind( ) method, 425
RGB (red, green, and blue), 735
color components, 56
images, 734
values, 735
Rich Music Format (RMF), 746
right-justifying text, 317
RMF (Rich Music Format), 746
RMI (remote method invocation), 26, 434, 461-474, 891
dynamic class loading, 468
example, 465
objects
activation, 473
serialization, 461
remote object references, passing, 470
security, 468
stubs and skeletons, 462
UnicastRemoteObject class, 463
rmic (RMI compiler), 462, 467
rmiregistry application, 464, 470
RMISecurityManager class, 468
roles, assigning to users, 528
root elements (XML), 820
root logger, 380
root node for user and system preferences trees, 377, 642
root path on web server for web applications, 505
roots, 406, 637
rotate by 13 letters (rot13) operation, 403
rotational transformation (images), 745
round( ) method, 344
rows
GridBagLayout, 672
justification in FlowLayout, 664
setting number in GridLayout, 665
spanning, 677
tables, 645
weights, calculating, 680
RPCs (remote procedure calls), 461
RTF documents, displaying in text components, 632
run( ) method, 251, 257, 585
HelloComponent4 class (example), 61
object-based servers, 459
Thread class, 61
TinyHttpdConnection class, 445
Runnable interface, 61, 250, 354
subclassing, 253
Thread class and, 250
threads, 251
running
applications, 31, 62, 68-70
BeanShell scripts, 876
Eclipse IDE examples, 871
runtime
adaptive compiler, use at, 7
collections, 357
errors, 66
interpreters, 4
systems, 28
typing (Java), 12
RuntimeException class, 64, 104
S[ Top ]
s (single-line) mode, regular expression matching, 332
safety, Swing, 584
sameFile( ) method, 485
SampleModel class, 740
save( ) method, 375
saveFile( ) method, 620
saving images, 746
SAX (Simple API for XML), 818, 823-831
SAXModelBuilder, 827
say( ) method, 262
scalable I/O with NIO, 474-482
scalars
types (C language), 87
values, 138
scaling images, 745
Scanner class, 337
schedule( ) method, 354
ScheduledExecutorService, 285
scheduling threads, 271-276
schemas, W3C simple types, 847
schemes, encoding, 392
scope
application-level in Java packages, 15
declaring, 182
local variables, 132
shadowed variables, 156
scripts
BeanShell, 876-881
reflection APIs, integrating, 210
scrollbars, 608, 613-615
SDK (Software Development Kit), 28, 67
javap tool, 71
policytool utility, 80
servlets and web applications, 501
system properties, access to, 69
searching
collections, 365
strings, 304
sections (CDATA), 821
Secure Socket Layer (SSL), 495
security
access to filesystems, controlling, 412
applets, 79, 789
application- and user-level, 20
bytecode verifier, 17
certificates, 808, 814
class loaders, 18
data transport, 529
digital signatures, using, 806
dynamic memory management, 13
error handling, 14
EventHandler class and, 783
HTTP daemon server, 446
incremental development, 12
inner classes, 191
Java
design features, 9
features, 20
implementation features, 15
modifiers, 203
policy files, 78, 811
procedural, 531
Reflection API, 201
RMISecurityManager, 468
scalability, 15
security managers, 17, 19
default, 79, 441
flagging windows, 20
policy files, using with, 81
SecurityManager class, 892
signing classes, 21
sockets, 441
threads, 14
type safety and method binding, 11
web applications, 528
web communications, 495
SecurityException class, 447
SecurityManager class, 793
seeding pseudorandom number generator, 345
seek( ) method, 412
select( ) method, 477
selectable channels, 475
selectable I/O with NIO package, 475
LargerHttpd (example), nonblocking web server, 478
nonblocking client-side operations, 482
selectAll( ) method, 625
selectedKeys( ) method, 477
selecting methods, 161
SelectionKey class, 475
selections
combo box and lists, 594
lists, 593
text components, 624
trees, 640
selectNow( ) method, 477
selectors, 475
checking for socket to finish connecting, 482
registering with channels, 476
selectText( ), 625
self-issued certificates, 812
self-signed certificates, 809
semaphores, 291
sendError( ) method, 509, 537
sendMessage( ) method, 454
sendRedirect( ) method, 509
separator lines, adding to menus, 603
Serial Version UID (SUID), 417
Serializable interface, 415
serialization, 415-418, 439
applets, 799
initializing deserialized objects, 417
JavaBeans, 753, 774, 780, 830
APIs, using with, 24
classes to XML, 830
methods, 262
protocols, 456-461
reflection, use of, 201
RMI, use of, 465
stream subclasses, use in, 415
servers, 439, 459
application, 501
clients, 437, 459
detecting lost client connections, 449
Java applications for (servlets), 501
LargerHttpd (example), nonblocking web server, 478
NFS, 413
object-based, 457
proxy servers, 449
Pulse (example), 453, 455
security restrictions on, 441
ServerSocket class, 437, 439
sockets, 437
TinyHttpd server (example), 443
Tomcat, 513
ServerSocketChannel class, 475
service( ) method, 506
services, BeanContextServices, 784
(see also web services)
ServletContext API, 520
ServletException class, 508
ServletRequest class, 507
servlets, 501, 506
content types, 508
deploying, 525
exceptions, 508
filters, 532-540
HelloClient, 507
HttpSession objects, 514
life cycle, 505
location of, requesting, 513
parameters, 510
responses, filtering, 537
session management, 513
ShoppingCart servlet (example), 516
ShowParameters, 511
ShowSession servlet (example), 514
SnoopServlet, 513
testing, 534
web applications, 504-521
session tracking (servlets), 513, 514
set( ) method, 204, 360
setActionCommand( ) method, 587
setAttribute( ) method, 515
setBorder( ) method, 598
setBound( ) method, 775
setBounds( ) method, 663
setBufferSize( ) (HttpServletResponse), 510
setBufferSize( ) method, 510
setChanged( ) method, 388
setComposite( ) method, 692
setConstraints( ) method, 673
setContentPane( ) method, 568
setContentType( ) method, 508,
setDaemon( ) method, 257
setDisplayName( ) method, 777
setDocumentFilter( ) method, 628
setDomain( ) (Cookie), 520
setDomain( ) method, 520
setDoOutput( ) method, 494
setDoubleBuffered( ) method, 714
setEchoChar( ) method, 629
setFocusable( ) method, 561
setFocusLostBehavior( ) method, 626
setFocusTraversalKeys( ) method, 638
setFont( ) method, 588
Component class, 624, 704
Graphics2D class, 704
setHeader( ) (HttpServletResponse), 509
setHeader( ) method, 509
setInt( ) method, 204
setJMenuBar( ) method, 604
setjmp( ) method, 103
setKeepAlive( ) method, 449
setLastModified( ) method, 409
setLayout( ) method, 662
setLocale( ) method, 350
setMaximumPriority( ) method, 277
setPaint( ) method, 692
setProperty( ) method, 376, 450
setReadOnly( ) method, 409
setRequestMethod( ) method, 494
setRequestProperty( ) method, 494
setRGB( ) method, 738
sets
attributes, 635
implementation classes, 366
ready set (selection keys), 478
SortedSet interface, 360
synchronized and read-only, 369
setSoLinger( ) method, 449
setSoTimeout( ) method, 448
setStream( ) method, 797
setStroke( ) method, 692, 702
setTcpNoDelay( ) method, 448
setText( ) method, 589, 624
setValue( ) method, 771
class, 625
Dial class, 660
setValueAt( ) method, 650
SGML (Standard Generalized Markup Language), 816
shadowing
methods, 158
variables, 133, 156
shallow copies, 197
shapes
clipping, 693-699, 712
creating for animation, 733
desktop colors, 701
drawing, 41, 694
filling, 693, 699
geometric in 2D API, 694
geometric transformation of, 692
graphics context for drawing, 689
methods, 694
rendering pipeline, 691
Shape interface and classes implementing, 694
solid colors, using, 700
stroking, 702
ShoppingCart servlet, 516
Short class, 311
short data type, 138
shortcuts (Eclipse IDEs), 872
show( ) method, 606, 671
showConfirmDialog( ) method, 616
showDialog( ) method, 621
showDocument( ) method, 795
showMessageDialog( ) method, 616
showOpenDialog( ) method, 620
ShowParameters servlet, 511
ShowSession servlet, 514
showStatus( ) method, 795
shutdownOutput( ) method, 449
side effects (expression evaluation), 99
signatures, 69, 806-815
signers, 813
Simple API for XML (see SAX)
Simple Object Access Protocol (SOAP), 862
simple types (W3C schema), 847
SimpleAttributeSet class, 635
SimpleElement class, 829
SimpleFormatter class, 382
single inheritance, 49, 155
single-line (s) mode, regular expression matching, 332
site certificates, 809
size( ) method
Collection class, 356
FileChannel class, 430
Map interface, 362
sizing, 753
applets, HTML attributes for, 800
beans, 753
BorderLayout, 667
buttons in GridBagLayout, 675
columns, table, 645
components, 595
frames, 34
grids, 674
JFrame, 566
JPanel class, 565
skip( ) method, 394
sleep( ) method, 63, 255
sliders (Swing), 613-615
Smalltalk programming language
dynamic data typing and late method binding, 11
Java, comparison to, 7
smart cards, 4
SnoopServlet, 513
SOAP (Simple Object Access Protocol), 862
SocketChannel class, 475, 482
sockets, 436-451
clients and servers, 437
datagram, 451-456
DatagramSocket class, 451
options, 447
security, 441
Socket class, 438
TCP, use of, 437
TinyHttpd server (example), 443
SOCKS service, 449
soft references, 150
Software Development Kit (see SDK)
software distribution over the Internet, 787
sort( ) method, 247
SortedMap interface, 362, 366
sorting collections, 372
source code
compilation units, 174
compiling with javac, 72
Eclipse IDEs, 875
source files (Eclipse IDEs), 869, 875
source images
processing with BufferedImageOp, 744
transforming to destination image, 741
(see also images)
source over destination compositing rule, 700
spacing, 328
spanning columns and rows, 677
specifying insets, 564
spinners, 595-597
SpinnerCalendarModel class, 597
SpinnerListModel class, 595
SpinnerNumberModel class, 595
split( ) method, 306
splitter bars, 610
splitting strings, 337
SpringLayout, 688
SSL (Secure Socket Layer), 495
stacking components, 564
stacks
Stack class, 71
StackTraceElement class, 109
traces, 108
standalone applications, 68
applets versus, 797
(see also applications)
standard annotations, 213
Standard Generalized Markup Language (SGML), 816
standard input, 392, 396
start( ) method, 62
Thread class, 251, 255, 454
UpdateApplet class, 259
startElement( ) method, 823
startsWith( ) method, 304, 306
state, 273
beans, 757
threads, 273
statements, 92
assignment, 101
BeanShell, using in, 877
break, 97
catch, 106
code blocks and, 93
conditional, 94
continue, 98
do/while, 94
enumerations, 97
in finally clause, 113
for, 95
if/else, 94
import
BeanShell, 878
Eclipse IDEs, 875
iterators, 94
package statement, 175
return, 114
switch, 96
synchronized, 99
try, 99
try/catch, 63, 106, 112
unreachable, 99
variable initialization, 101
static import facilities, 177
static members, 55, 129
static methods, 134, 160, 187
static modifiers
code blocks, 146
combining with final modifier, 130, 172
main( ) method, 69
variables, 127
static variables, adding, 129
statically typed programming languages, 11
statusAll( ) method, 728
statusID( ) method, 728
StatusImage class, 727
stop( ) method
Thread class, 251, 255
UpdateApplet class, 259
stopping threads blocked in I/O operations, 423
storeToXML( ) method, 375
streams
byte, 392
converting to/from character streams, 394
piped, creating, 400
characters, 394
input/output, 389-404
I/O, 389
channels versus, 423
compressed data, 418
data streams, 397
data transfer, network byte order, 442
file, 409
FileChannels for, 429
objects, 415
obtaining from, 485
order of creation, 460
piped, 400
rot13InputStream class (example), 403
server request/response cycle, 459
strings, wrapping with, 402
terminal I/O, 392
strictfp class modifier, 88
String class, 305
StringBuffer class, 306
StringBuilder class, 306
strings, 44, 299-308
+ (concatenation) operator, 100
arrays of, 69
backslashes in, 406
CharBuffers, integration with, 427
comparing, 302
constructors, 300
converting, 317
editing, 304
equivalence of, 368
error messages, specifying with, 110
escaped characters, 326
expression, tokenizing and parsing, 651
flags, 320
languages, 303
operations on, 101
parsing, 351
printf-style formatting, 315-321
searching for substrings in, 304
splitting, 337
StringBuffer class, 306
StringBuilder class, 306
StringIndexOutOfBoundsExceptions, 351
StringIterator class, 470
StringTokenizer class, 313, 651
support for Unicode, 84
tokenizing, 337
uppercase characters, 318
URL-encoded, 510
values, 301
StringTokenizer class, 313, 651
strokes
outlines, 694
setting for Graphics2D objects, 692
shapes, 702
Stroustrup, Bjarne, 16
structural information, separating from presentation, 816
strut components, 669
Struts, 504
stubbed-out methods, 582
style identifiers for fonts, 704
stylesheets (XSL), 857
subclassing, 107, 154-169, 253
array classes, 181
Error class, 110
generics, 227
interfaces, 174
reference types and, 90
shadowed variables, 156
subclassing subclasses, 155
subtypes and, 54
Thread class, 253
visibility and, 180
subinterfaces, 173
subMap( ) method, 362
submenus, creating, 602
subSet( ) method, 360
substitutions, replacing text, 338
substring( ) method, 101, 305, 306
substrings, searching, 304
subtype polymorphism, 90, 158
SUID (Session Version UID), 417
sum( ) method, 651
Sun Microsystems
Java web site, xvii
NFS, 451
SDK, obtaining latest, 28
super( ) method, 167
super reference, 144, 157, 164
superclasses
class inheritance and, 37
constructors, applying, 167
finalize( ) methods of, 149
supplying, 567
@SuppressWarnings annotation, 213
suspend( ) method
Thread class, 255
ThreadGroup class, 277
Swing, 25, 584, 788
AWT Robot, 583
borders, 598-600
buttons and labels, 586-590
checkboxes and radio buttons, 590
components, 52, 555-562, 586, 622
containers, 562-569
conventions, 571
customizing, 656-661
desktops, 652
dialog, 615-621
double buffering images, 714
events, 569-583
focus navigation, 637
JApplet class, 789
JavaBeans, 751
JScrollPane class, 608-610
JSplitPane class, 610
JTabbedPane class, 611-613
lists and combo boxes, 592-595
menus, 600-604
modifying, 585
multithreading, 584
naming, 49
pluggable L&F, 653-656
pop-up menus, 604-608
scrollbars, 613-615
ShowApplet (example), 791
sliders, 613-615
spinners, 595-597
tables, 643-652
text, 622-637
trees, 638-643
update( ), versus AWT update( ), 713
SwingUtilities class, 585, 655
switch statements, 96
sync( ) (Preferences), 378
synchronization, 271
collection implementations, 369
constructs, 291
cost of, 278
Java tools for, 60
join( ) method, using, 256
modifiers, 57, 65, 144, 263, 370
Selector objects, 477
statements, 99
threads, 14, 250, 261-271
syntax
XML, 819-823
XPath, 837
System class
exit( ) method, 258
input/output and errors, 392
system properties, 375
systemNodeForPackage( ) method, 378
System.out, 375, 399
systemRoot( ) method, 377
systems
fonts available on, 703
preferences, 377
properties
font names, 703
incrementaldraw and redrawrate, 710
resources, 17
runtime, 28
T[ Top ]
<T> class, 229
tables
creating with JTable constructor, 643
rows, 645
Swing, 643-652
TableModel interface, 643, 645
tags
annotations, 211-213
<APPLET>, 789
<applet>, 798
<body>, 821
doc comment, 85
empty, 819
HTML, 74
<img>, 589
parameters, 799
Plug-in applets, problems with, 804
stylesheet, 857
XML, 819
Tcl/Tk scripting language, 8
TCP (Transmission Control Protocol), 894
client-side connections, 482
closing one side of connection, 449
NoDelay option, 448
UPD versus, 451
temperature lookup service (example), 498
templates
engines, 339
HTML conversions, 805
XSL, 857
term( ) method, 651
terminating threads, 257
ternary operator, 62
testing
DOM, 833
servlets, 534
TestModelBuilder, 829
@TestValues annotation, 212
text, 298
aligning, 317
alternate, displayed by browsers unable to run applets, 801
APIs related, 299
combo boxes, displaying in, 593
data models, sharing, 630
displaying in windows with JLabel objects, 31
drawing, 696
embedding in source code, 300
encoding, 83, 820
fonts, 702-707
internationalization, 308-311
java.text package, 321-325
labels, creating and changing, 588
management, 635
message formatting, 323
parsing and formatting, 311-315
regular expressions (and pattern matching), 325
replacing, 338
Swing GUI, 622-637
filtering input, 626
formatted text, 625
TextEntryBox application (example), 623
tokenizing, 313
textures, 701
thickness, shape outlines, 702
this( ) method, 168
this reference, 45, 133, 144, 164, 190
Thread class, 250
ThreadFactory interface, 288
ThreadGroup class, 277
ThreadLocal class, 271
ThreadPoolExecutorService, 287
threads, 60, 249-258, 273
adapters, 254
applets, 258, 261
concurrency, 280-297
controlling, 255
creating and starting threads, 251
daemon, 69, 257
groups, 276-278
multithreading, 60
native, 275
notify( ) method, 266
performance, 278-280, 474
priority, 271-276
Runnable interface, 251
running code in, 62
safety
collections, 369
XSLT Transforms, 862
scheduling, 271-276
server, 440, 474
servlets, single and multiple, 506
sleep( ) method, 64
subclassing Thread, 253
Swing (multithreading), 584
synchronization, 64, 250, 261-271
terminating, 257
Thread class, 61, 250, 255
unchecked exceptions, 277
wait( ) method, 266
Thread.State enumeration, 273
Thread.UncaughtExceptionHandler, 278
Throwable interface, 109
throwing exceptions, 63, 110
throw statements, 894
throws clauses, 894
tick marks (sliders), major and minor, 615
time, 346-353
absolute, 443
slicing, 273
(see also dates and times)
timers, 353
as invisible beans, 762
sockets, I/O methods, 447
Timer class, 353
timeStep( ) method, 733
TimeZone class, 348
TinyHttpd servers, 443
toByteArray( ) method, 403
toCharArray( ) method, 301, 306
toggle switches (checkboxes), 590
toHexString( ) method, 312
token( ) method, 651
tokenizing
strings, 337
text, 313
toLowerCase( ) method, 306
Tomcat server, 513
toolbars (JToolBar class), 634
Toolkit class
images, creating, 708
prepareImage( ), 726
tools, 29
(see also utilities)
TooManyListenersException, 573
top-level classes, 182
toString( ) method, 302, 402
ByteArrayOutputStream class, 540
Integer and Long classes, 312
Object class, 193
String class, 306
StringBuffer class, 307
toUpperCase( ) method, 306
toURL( ) method, 409, 747
traces (stacks), 108
tracking user sessions, 515
Trang, 849
transferFrom( ) method, 432
transfers, direct data, 432
transferTo( ) (FileChannel), 432, 482
transformations
geometric, 692, 741, 745
rendering and, 696
XML (XSL/XSLT), 856-862
Transformer class, 835
transient modifier, 415
translate( ) method, 692
Transmission Control Protocol (see TCP)
transparency
ARGB color model, 736
drawing with, 700
traversal policy objects, focus, 637
TreeMap class, 366
TreeNode interface, 639
trees, 640
collections, 365
complete example, 640
events, 643
selection events, listeners for, 643
Swing, 638-643
TreeSelectionListener interface, 640
TreeSet class, 366
triangular arrays, 124
trigonometry in Dial component (example), 660
trim( ) method, 304
troubleshooting
commands, 65
containers, 215
exceptions, 103-115
getContentPane( ) method, 66
runtime errors, 66
versions, 66
truncate( ) method, 430
trust, CAs, 808
trusted applets, 793
try statements, 99
try/catch statements, 63, 106, 112, 884
two-dimensional API (see 2D API)
types, 18, 35
arguments, 240
arrays, 244
collections, 359
complex (XML), 848
events, 574
explicit, 241
generics, 216-219
accessing, 208
arrays, 243-246
bounds, 230-232
casts, 225
containers, 215
Enum class, 246
erasure, 220
methods, 238-243
parameterized type relationships, 223-225
raw types, 221
sort( ) method, 247
wildcards, 232-238
writing, 226-230
parameter limitations, 222, 229
primitive
autoboxing and unboxing, 139
wrappers for, 137
variables, 226
W3C schema simple, 847
web services, 546
wildcard relationships, 237
U[ Top ]
UCS (universal character set), 895
UDP (User Datagram Protocol), 451, 894
UIManager class, 655
unbounded wildcards, 232
unboxing primitive types, 139
unchecked exceptions, 109, 277
UnicastRemoteObject class, 463
Unicode
Charset class, 428
encapsulation in String objects, 299
Uniform Resource Identifiers (see URIs)
Uniform Resource Locators (see URLs)
Uniform Resource Names (see URNs)
universal character set (UCS), 895
Unix
CLASSPATH environment variable, 70
grep command, 432
GUI desktop, 2
UnknownHostException class, 438
UnknownServiceException, 485
unmarshaling XML documents, 853
unnamed packages, 177
unpacking JAR files, 76
unreachable objects, 148
unreachable statements, 99
UnsupportedOperationException, 356, 359
untrusted applets, 793
browser restrictions on, 793
sharing class loaders, 796
update( ) method, 387, 690
updateComponentTreeUI( ) method, 655
updating
BufferedImage class, 738
coordinates, 733
fields, 297
GUIs, 559
images, 738
uppercase character strings, 318
URIs (Uniform Resource Identifiers), 496, 821
URLEncoder class, 491
<url-pattern>, 524
URLs (Uniform Resource Locators), 483
class files, 468
converting file paths to, 408
cookie deployment, specifying for, 520
describing codebases, 80
document base and codebase, 794
encoding data in, 494
extra paths, 510
GET method, 491
image files, constructing for, 708
movies or audio files, 749
pattern mappings, 524
rewriting, 513-516
URL class, 484-490
web application servlets and files, 505
XSL stylesheets, 862
URNs (Uniform Resource Names), 483, 495
User Datagram Protocol (see UDP)
userNodeForPackage( ) method, 378
userRoot( ) method, 377
users
authentication, 530
certificates (signer) signer certificates, 810
role assignment, 528
space coordinates, 692
UTF-8 encoding, 820, 895
utilities
collections, 354-374
dates and time, 346-353
logging API, 379-386
math, 342-346
Observer interface, 387
Preferences API, 376-379
properties, 374-376
timers, 353
WSDP, 497
utility classes, 585
Collections class, 369
Enumerator interface, 359
Hashtable class, 355
internationalization, 308
SortedSet interface, 360
timers, 353
Vector class, 354
V[ Top ]
-v (verbose) option (jar utility), 75
validating
input to methods, 117
root containers, 564
text in JFormattedTextField component, 626
XML, 843-851
valueOf( ) method, 301, 306
value-of tag (XSL), 858
values
data objects, 546
default property, 374
enum, 151
false, 88
hash codes, 367
Main-class, adding to manifests, 77
return, 206
RGB, 735
scalar, 138
strings, converting, 301
zero, 43
(see also null values)
values( ) method, 362
variable-length argument lists, 140
variables, 32, 127
access, 101, 203
assigning value to, 101
class, 35, 127, 201
converting to/from strings, 301
declaring, 93, 126
inheritance, 37, 154
initializing, 88, 135
instance, 43, 127, 263, 415
assigning value to, 45
constructor chaining and, 168
default values, 43
interfaces, 172
local, 43, 132
public modifiers, 178
reference types, 90
shadowing, 133, 156
static class members, 129
this reference, 133
transient, 415
types, 11, 226
weightx, 678
weighty, 678
(see also instance variables)
vectors, 354
verbose (-v) option (jar utility), 75
verbose mode, jar utility, 75
verifier( ) method, 9
verifiers, bytecode, 17
verify( ) method, 629
VERITCAL constant, 676
versions, troubleshooting, 66
vertical scrollbars, display policy, 609
vetoableChange( ) method, 765
video files, 748
viewers for applets
appletviewer program, 803
creating, 798
viewing
applets, 805
appletviewer program, 803
images, 707-712
Plug-in applets, 805
views (components), 631
virtual machines, 4-7, 31
virtual memory, 431
virtual methods (C++), 159
visibility
applets, 790
basic access modifiers, 178
classes, 15, 175
inheritance and, 155
invisible components in BoxLayout, 669
of methods and variables, 178-181
security, 192
shortcomings in API, 797
subclasses and, 180
visibility modifiers
access to class members, controlling, 128
constructors, 144
private, 16, 56
protected, 891
public, classes in source code files, 72
static inner classes, 188
visual development environments, 24
void return type, 132, 206
W[ Top ]
W3C schema simple types, 847
wait conditions, 266
wait( ) method, 255, 264
waitForAll( ) method, 728
waitforID( ) method, 728
WaitServlet, 534
wakeup( ) method, 477
waking up threads blocked in I/O operations, 423
WAR files, 505, 521-532
Ant, 540-543
deployment, 505
@WarningMessage annotation, 212
weak references, 149, 371
weakCompareAndSet( ) method, 297
WeakHashMap class, 371
web applications, 504
communicating with, 490-496
filters, 532-540
frameworks, 504
HttpURLConnection, 494
Java Servlets API, 27
JSPs, 503
reloading, 526
security, 528
servlets, 504-521
technologies, 502-504
URLs, URNs, and URIs, 495-500
WAR files, 521-532
XML, 504
(see also applications)
web browsers, 5
POST method, 510
(see also browsers)
web pages, dynamic content, 787
web services, 862
applying, 549
data types, 546
deploying, 548
implementing, 543-551
XML, 862
Web Services Description Language (WSDL), 497
Web Services Developer Pack, 497
Web Start API, 79
Web Start (Java), 806
webapps directory, 526
WEB-INF directory, 522
WebNFS Java extension, 413
web.xml files, 505, 522, 541
weighting (GridBagLayout), 675, 678, 682
weightx variable, 678
weighty variable, 678
welcome files, 526
well-formed documents (XML), 822
whitespace, 328
HTML tags, 799
StringTokenizer class, use of, 314
trimming from strings, 306
width
of images, 726
of text, 317
wildcards
arrays, 245
bounded, 233
capture, 242
containers, 233
generics, 232-238
instantiation, 232
methods, comparing to generic, 243
raw types, 236
relationships, 237
windows
JFrame objects, creating with, 31, 33
JWindow, 565
local system, colors for, 701
revalidating subclasses, 663
within windows, creating, 652
Windows operating systems, 71
Wong, Henry, 15
Wood, Dave, 553
word processors, building with JTextPane, 637
words
characters, 328
parsing strings of text into, 313
positioning, 329
workCompleted( ) method, 472
WorkRequest class, 457, 470
workspace (NetBeans), 755
wrap( ) method, 427
wrapper classes
HttpServletResponseWrapper class, 537
primitive types, 137, 311
streams, 396, 403
strings, 402
write( ) method
BufferedOutputStream class, 398
LargerHttpd class, 481
OutputStream class, 439
PipedOutputStream class, 400
writeInt( ) method, 397
writeObject( ) method, 416, 460
write-only properties, 769
Writer class, 391
writing
generics, 226-230
locks, 289
wscompile command, 544
WSDL (Web Services Description Language), 497
WYSIWYG GUI builder environment, 672, 774
X[ Top ]
XInclude, 841
XML (Extensible Markup Language), 816
applications, 504
backing store files, 378
browsers, 818, 862
complex types, 848
document headers and root elements, 820
DOM, 831-836
downloadable handlers and, 489
encoding, 820
history of, 816-819
Java object models, 825
JAXB, 851-856
namespaces, 821
parsers, 817
SAX, 818, 823-831
state of, 818
syntax, 819-823
tags, 819
text versus binary, 817
validating, 843-851
web services, 862
web.xml files, 522
XML Schema, using, 845
XPath, 836-843
XSL, 818, 859
XSL/XSLT, 856-862
XMLDecoder class, 830
XMLEncoder class, 830
XMLGrep, 840
xmlns attribute, 821
XMLReader class, 824
XML-RPC, 496
XPath, 836-843
XSL (Extensible Stylesheet Language), 856
Y[ Top ]
years, setting, 347
yield( ) method, 276
Z[ Top ]
zero administration client installation, 806
zero values, 43
ZIP compression format, 70, 74
ZipInputStream class, 421
ZipOutputStream class, 419
zones (time), TimeZone class, 348
Z-ordering, 564
Zurück zu Learning Java