Table of Contents
Select one of the links below to find the contents of that trail.
Getting Started
Writing Java Programs
Writing Applets
Creating a User Interface
Custom Networking and Security
To 1.1 -- And Beyond!
Writing Global Programs
Integrating Native Code and Java Programs
JavaBeans Tutorial
Java Security 1.1
Getting Started
The "Hello World" Applet
The Anatomy of a Java Applet
Importing Classes and Packages
Defining an Applet Subclass
Implementing Applet Methods
Running an Applet
The "Hello World" Application
The Anatomy of a Java Application
Comments in Java Code
Defining a Class
The main() Method
Using Classes and Objects
Common Compiler and Interpreter Problems (and Their Solutions)
Writing Java Programs
Object-Oriented Programming Concepts: A Primer
What Is an Object?
What Are Messages?
What Are Classes?
What Is Inheritance?
Where Can I Get More Information?
The Nuts and Bolts of the Java Language
Run the Application
Variables and Data Types
Operators
Expressions
Control Flow Statements
Arrays and Strings
Other Features of the Character-Counting Application
The main() Method
Introducing Exceptions
The Standard Input and Output Streams
Objects, Classes, and Interfaces
The Life Cycle of an Object
Creating Objects
Using Objects
Cleaning Up Unused Objects
Creating Classes
The Class Declaration
The Class Body
Declaring Member Variables
Implementing Methods
The Method Declaration
Passing Information into a Method
The Method Body
Controlling Access to Members of a Class
Instance and Class Members
Life Cycle Methods
Constructors
Writing a
finalize
Method
Subclasses, Superclasses, and Inheritance
Creating Subclasses
Overriding Methods
Writing Final Classes and Methods
Writing Abstract Classes and Methods
The Object Class
Creating and Using Interfaces
What Are Interfaces?
Defining an Interface
Implementing an Interface
Using an Interface as a Type
Creating and Using Packages
Roll Your Own Packages
Using the Classes and Interfaces from a Package
The Java Packages
The String and StringBuffer Classes
Why Two String Classes?
Creating Strings and StringBuffers
Accessor Methods
More Accessor Methods
Modifying StringBuffers
Converting Objects to Strings
Converting Strings to Numbers
Strings and the Java Compiler
Java Strings are First-Class Objects
Setting Program Attributes
Setting Up and Using Properties
Command Line Arguments
Conventions
Parsing Command Line Arguments
Using System Resources
Using the System Class
The Standard I/O Streams
System Properties
Forcing Finalization and Garbage Collection
Miscellaneous System Methods
Using System-Dependent Resources
Handling Errors Using Exceptions
What's an Exception and Why Do I Care?
Your First Encounter with Java Exceptions
Java's Catch or Specify Requirement
Dealing with Exceptions
The ListOfNumbers Example
Catching and Handling Exceptions
The try Block
The catch Block(s)
The finally Block
Putting It All Together
Specifying the Exceptions Thrown by a Method
How to Throw Exceptions
The throw Statement
The Throwable Class and Its Subclasses
Creating Your Own Exception Classes
Runtime Exceptions--The Controversy
Threads of Control
What Is a Thread?
A Simple Thread Example
Thread Attributes
Thread Body
The Clock Applet
Thread State
Thread Priority
Daemon Threads
Thread Group
The ThreadGroup Class
Multithreaded Programs
Synchronizing Threads
Monitors
Java Monitors Are Re-entrant
The notifyAll() and wait() Methods
Fairness, Starvation, and Deadlock
Deadlock and the Dining Philosophers
Summary
Input and Output Streams
Your First Encounter with I/O in Java
Overview of Input and Output Streams
Using Input and Output Streams
Using Streams to Implement Pipes
Using Streams to Read and Write Files
Using Streams to Read and Write Memory Locations
Using Streams to Concatenate Files
Working with Filtered Streams
Using DataInputStream and DataOutputStream
Writing Your Own Filtered Streams
Working with Random Access Files
Using Random Access Files
Writing Filters for Random Access Files
Writing Applets
Overview of Applets
The Life Cycle of an Applet
Methods for Milestones
Methods for Drawing and Event Handling
Using UI Components
Threads in Applets
Examples
What Applets Can and Can't Do
Adding an Applet to an HTML Page
Summary
Creating an Applet User Interface
Creating a GUI
Playing Sounds
Defining and Using Applet Parameters
Deciding Which Parameters to Support
Writing the Code to Support Parameters
Giving Information about Parameters
Reading System Properties
Displaying Short Status Strings
Displaying Diagnostics to the Standard Output
Communicating with Other Programs
Sending Messages to Other Applets on the Same Page
Communicating with the Browser
Working with a Server-Side Application
A Simple Network Client Applet
Using a Server to Work Around Security Restrictions
Understanding Applet Capabilities and Restrictions
Security Restrictions
Applet Capabilities
Finishing an Applet
Before You Ship that Applet
The Perfectly Finished Applet
Common Applet Problems (and Their Solutions)
Creating a User Interface
Overview of the Java UI
AWT Components
Other AWT Classes
The Anatomy of a GUI-Based Program
Classes in the Example Program
The Component Hierarchy
Drawing
Event Handling
Using Components, the GUI Building Blocks
Using the AWT Components
General Rules for Using Components
How to Use Buttons
How to Use Canvases
How to Use Checkboxes
How to Use Choices
How to Use Dialogs
How to Use Frames
How to Use Labels
How to Use Lists
How to Use Menus
How to Use Panels
How to Use Scrollbars
How to Use TextAreas and TextFields
Details of the Component Architecture
Common Component Problems (and Their Solutions)
Laying Out Components within a Container
Using Layout Managers
General Rules for Using Layout Managers
How to Use BorderLayout
How to Use CardLayout
How to Use FlowLayout
How to Use GridLayout
How to Use GridBagLayout
Specifying Constraints
The Applet Example Explained
Creating a Custom Layout Manager
Doing Without a Layout Manager (Absolute Positioning)
Common Layout Problems (and Their Solutions)
Working with Graphics
Overview of AWT Graphics Support
Using Graphics Primitives
Drawing Simple Shapes
Working with Text
Using Images
Loading Images
Displaying Images
Manipulating Images
How to Use an Image Filter
How to Write an Image Filter
Performing Animation
Creating the Animation Loop
Animating Graphics
Eliminating Flashing
Overriding the update() Method
Double Buffering
Moving an Image Across the Screen
Displaying a Sequence of Images
Improving the Appearance and Performance of Image Animation
Common Graphics Problems (and Their Solutions)
Custom Networking and Security
Overview of Networking
Networking Basics
What You May Already Know About Networking in Java
Working with URLs
What Is a URL?
Creating a URL
Parsing a URL
Reading Directly from a URL
Connecting to a URL
Reading from and Writing to a URLConnection
All About Sockets
What Is a Socket?
Reading from and Writing to a Socket
Writing the Server Side of a Socket
All About Datagrams
What Is a Datagram?
Writing a Datagram Client and Server
Providing Your Own Security Manager
Introducing the Security Manager
Writing a Security Manager
Installing Your Security Manager
Deciding What SecurityManager Methods to Override
To 1.1 -- And Beyond!
What's New in 1.1?
New Features in 1.1
Internationalization
Security and Signed Applets
AWT Enhancements
JavaBeans(tm)
JAR File Format
Networking Enhancements
I/O Enhancements
Math Package
Remote Method Invocation
Object Serialization
Reflection
Java Database Connectivity
Inner Classes
Java Native Interface
Performance Enhancements
Miscellaneous
How the 1.1 Release Affects Existing Trails
How the 1.1 Note Links Work
GUI Changes in 1.1 and Beyond
The New AWT Event Model
Introduction to the New AWT Event Model
Using Adapters and Inner Classes to Handle AWT Events
Handling Standard AWT Events
Events Generated by AWT Components
Writing an Action Listener
Writing an Adjustment Listener
Writing a Component Listener
Writing a Container Listener
Writing a Focus Listener
Writing an Item Listener
Writing a Key Listener
Writing a Mouse Listener
Writing a Mouse Motion Listener
Writing a Text Listener
Writing a Window Listener
Generating AWT Events
Summary of the AWT Event Model
Using the JFC "Swing" Release
[8/8: added "last updated" info]
Overview of the Swing Components
Getting Started with Swing
Running a Swing Applet
[8/8: Updated to reflect current shaky state. Improved class path page a bit.]
Using Each Swing Component
General Rules for Using Swing Components
How to Use Bordered Panes
How to Use Buttons
How to Use Checkboxes
How to Use Labels
How to Use List Boxes
How to Use Menus
How to Use Panels
How to Use Popup Menus
How to Use Progress Bars
How to Use Radio Buttons
How to Use Scroll Bars
How to Use Scroll Panes
How to Use Separators
How to Use Sliders
How to Use Tabbed Panes
[8/8: Fixed this link]
How to Use Tables
How to Use Text
How to Use Tool Tips
How to Use Trees
Writing Lightweight Components Using the Swing Release
Writing Lightweight Components
Converting Programs to the 1.1 AWT API
Writing Global Programs
Internationalization? Localization? Arg!
What is a Global Program?
Common Problems with Global Programs
The Global Features of the JDK
Managing Data in Global Programs
Exploring
AroundTheWorld
What Are Locales and How Do I Use Them?
Managing Locale-Sensitive Data
Loading Resource Bundles
Storing and Accessing Strings in Resource Bundles
Storing and Accessing Other Kinds of Objects in Resource Bundles
Representing Dates and Times
How to Format Numbers, Dates and Times, and Messages
The Format Classes
How to Format Numbers
How to Format Dates and Times
How to Format Messages
Internationalizing an Existing Program: Step by Step
Step 1: Identify the Locale-Sensitive Areas
Step 2: Isolate the Locale-Sensitive Data
Step 3: PENDING
Collation and Text Boundaries
The Collation Demo
Collation Details
The Text Boundary Demo
Integrating Native Code and Java Programs
Step By Step
Step 1: Write the Java Code
Step 2: Compile the Java Code
Step 3: Create the .h File
Step 4: Write the Native Method Implementation
Step 5: Create a Shared Library
Step 6: Run the Program
Implementing Native Methods
Declaring Native Methods
Java Types in Native Methods
Accessing Java Strings in Native Methods
Working With Java Arrays in Native Methods
Calling Java Methods
Accessing Java Fields
Handling Java Errors from Native Methods
Local and Global References
Threads and Native Methods
Invoking the Java Virtual Machine
JNI Programming in C++
JavaBeans Tutorial
Introducing Java Beans
Definition: What is a bean?
Reusable Software Components
Application Builder Tools
Basic Bean Concepts
Important Terms
[PENDING]
Java Beans Developer Toolkit
Java Beans API
[PENDING]
Example programs
[PENDING]
BeanBox
[PENDING]
Writing a Simple Bean
Creating a Bean
Adding Properties
Defining Events
[PENDING]
Supporting Persistence
[PENDING]
Writing Advanced Beans
Bound Properties
[PENDING]
Contstrained Properties
[PENDING]
Customizing Beans
[PENDING]
Using BeanInfo for Builder Tools
[PENDING]
Packaging Beans for Distribution
Packaging a Bean
[PENDING]
Building a Jar File
[PENDING]
Accessing Jar File Resources
[PENDING]
Testing Your Beans
The BeanBox Application
Starting BeanBox
Purpose of BeanBox
[PENDING]
Using Example Beans
Adding Your Bean to BeanBox
[PENDING]
Modifying BeanBox Menus
[PENDING]
Java Beans Glossary
Terms and Definitions
[PENDING]
Java Security 1.1
Java Security API Overview
Using the Security API to Generate and Verify a Signature
Step 1: Prepare Initial Program Structure
Step 2: Generate Public and Private Keys
Step 3: Sign the Data
Step 4: Verify the Signature
Step 5: Compile the Program
Step 6: Run the Program