home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Sams Teach Yourself Visual J++ 6 in 21 Days
(Publisher: Macmillan Computer Publishing)
Author(s): Rick Leinecker
ISBN: 0672313510
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Introduction
About the Authors

Week 1—At a Glance
Day 1—Getting Started: The Visual J++ Environment
Java and Visual J++
The Power of Java
Limitations of the Web
Solutions for the Web with Java
The Introduction of Visual J++ 6
Highlights of the Visual J++ Environment
Getting Help
Navigating Your Source-Code Windows
Build Options
Project Settings
Creating Your First Applet
What Comes First
Member Variable Declarations
Constructors
The init() Method
The start() Method
The run() Method
The stop() Method
The destroy() Method
Creating Your First Application
Resources on the Web
www.microsoft.com/visualj/
www.sun.com/java/
www.developer.com/directories/pages/dir.java.html
www.javasoft.com
www.javalobby.org
www.javaworld.com/javasoft.index.html
www.jars.com
Macmillan Computer Publishing’s Java Resource Center
Summary
Q&A
Review Exercises
Day 2—Java Language Fundamentals
Java Variables
Declaring Variables
Naming Variables
Declaring Variable Types
Initializing and Storing Values in Variables
Initializing an Array
Java Expressions
Understanding Operators
Evaluating Operator Precedence
Forcing Operator Precedence
Performing Array Operations
Java Program Control
if Statements
switch Statements
Programming with Loops
break and continue Statements
Java Exceptions
Managing the Call Stack
Throwing Exceptions
Catching Exceptions
Handling Exceptions with try-catch
Declaring Exceptions
Summary
Q&A
Day 3—Making Applets Live On the Web
The <APPLET> Tag
Attributes
CODEBASE
Applet Parameters
Good, Solid Values
Multiple Values
Alternate HTML
The Closing Applet Tag
Making Applets Live
Obtaining WS_FTP
Creating the Web Server Directory Layout
Connecting to the Server
Uploading the Applet
Editing the HTML File
Summary
Q&A
Review Exercises
Day 4—Debugging Java Applets and Applications
Preparing Projects for Debugging
Starting a Debugging Session
Stepping Through a Project
Step Into
End
Step Over
Step Out
Run To Cursor
Debug Windows
The Watch Window
The Locals Window
The Autos Window
The Immediate Window
The Call Stack Window
Breakpoints
The Breakpoints Dialog Box
Debugging Tips
Is This Mistake Somewhere Else Also?
What Next Bug Is Hidden Behind This One?
What Should I Do to Prevent Bugs Like This?
Applications of the Technique
Good Design Can Prevent the Need for Debugging
Design Your Program Carefully
Organize Your Program Well
Make Each Class and Method Easy to Understand
Read Your Source Code and Simulate It Mentally
Summary
Q&A
Review Exercises
Day 5—Windows
Creating Windows with the Frame Class
Defining Java Classes
Declaring Classes
Declaring Instance Variables
Using Class Variables
Declaring Methods
Overloading Methods
Declaring Constructors
Creating and Destroying Objects
Comparing Objects
Copying Objects
Using Inheritance
Using the Super() Method
Calling Superclass Constructors
Calling Superclass Methods
Calling with the this Keyword
Creating a Program That Uses an Extended Frame Class
Listening for Frame Class Events
Collecting the Garbage
Summary
Q&A
Exercises
Day 6—Menus
Creating Applet Menus
Handling Applet Menu Events
Using a Menu in an Applet
Creating Menus in Applications
Adding Menu Events in Applications
Presenting a Sample Application Program
Adding Pop-Up Menus in Applets
Summary
Q&A
Review Exercises
Day 7—Applet User Interface Controls
The Button Control
Constructors
Handling Events
The Checkbox Control
Constructors
Checkbox Events
Sample Programs
Checkbox Groups
Constructors
Grouping Check Boxes
Sample Program
The Choice Control
Constructors
Choice Events
Sample Programs That Handle Choice Control Events
The List Control
Constructors
List Control Events
Sample Programs
The TextField Control
Constructors
Sample Program
The TextArea Control
Constructors
Events
The Label Control
Constructors
Events
Sample Program
Summary
Q&A
Exercises

Week 2—At a Glance
Day 8—Application Controls
Label, Edit, and RichEdit Controls
Label Control
Edit Control
RichEdit Control
Button, CheckBox, RadioButton, and GroupBox Controls
Button Control
CheckBox Control
RadioButton Control
GroupBox Control
ComboBox, ListBox, and CheckedListBoxy Controls
ComboBox Control
ListBox Control
CheckedListBox Control
ListView and TreeView Controls
HScrollbar and VScrollbar Controls
Toolbar and StatusBar Controls
Toolbar Control
StatusBar Control
Summary
Q&A
Exercises
Day 9—Dialogs
Creating a Dialog
Handling Dialog Button Events
Performing Tasks When Users Click
Useful Form Methods
Summary
Q&A
Exercises
Day 10—Fonts and Text
The Graphics Class
Methods to Override for Painting
The repaint() and update() Methods
Try It Yourself!
The Graphics Coordinate System
The Font Class
Drawing Text
Setting Colors in Java
The FontMetrics Class
Finding Out Which Fonts Are Available
Fonts in Visual J++ Applications
A Marquee Applet
Setting the Font of a Control
Summary
Q&A
Review Exercises
Day 11—Drawing
The Graphics Class
Lines
Rectangles
Plain Rectangles
Rounded Rectangles
Three-Dimensional Rectangles
Polygons
Drawing Thick Lines with Polygons
Ovals
Arcs
The copyArea() and clearRect() Methods
Summary
Q&A
Review Exercises
Day 12—Images
Picture File Types: GIF and JPG
GIF Image Files
JPG Images
GIF and JPG Comparisons
The Image Class
ImageObserver
Loading Images
Loading Images in Java Applets
Loading Images in Java Applications
Displaying Images
Waiting for Images: Using the MediaTracker Class
Drawing Part of an Image
Adding Borders to Your Images
Drawing Your Images Inverted and Reversed
Summary
Q&A
Review Exercises
Day 13—Image Processing
Getting Pixel Data from Applet Images
Getting Pixel Data from Application Images
Creating an Image from Pixel Data in an Applet
Creating an Image from Pixel Data in an Application
Working with Pixel Data in Applets
Working with Pixel Data in Applications
Image Point Processing
Converting Images to Grayscale
Changing the Brightness of an Image
Colorizing Images
One Program, Many Processes
Horizontal and Waves
Creating Line Art from Images
Blurring Images
Summary
Q&A
Review Exercises
Day 14—Animation
Threads and Timers
Threads in Visual J++ Applets
Timers in Visual J++ Applications
Double Buffering
Line Animation
The SimpleLineAnimation Applet
The RandomLine Application
Bouncing Balls
Multiframe Images
Ad Banners
Summary
Q&A
Review Exercises

Week 3—At a Glance
Day 15—Exceptions
What Are Exceptions?
Exception Handling the Java Way
Java’s Exception Classes
Demo: An Applet That Handles File I/O Exceptions
Demo: Implementing User-Defined Exceptions
Summary
Q&A
Review Exercises
Day 16—Mouse Input
Using the MouseListener Interface
Using the MouseMotionListener Interface
Handling Mouse Events
Adding Mouse Events in Visual J++ Applications
Using Mouse Events in an Application
Summary
Q&A
Exercises
Day 17—Threads
Threads in Brief
Implementing Multiple Threads
Using the Thread Class
Using an Interface
Coding a Multithreaded Program
Using the Synchronized Method Modifier
Learning About Daemon Threads
Debugging Threads
Thread Class Definition
Demo: A Single-Threaded Applet with a Tight Loop in Initialization
Demo: A Multithreaded Applet with a Tight Loop in Initialization
Writing a Multithreaded Program
Summary
Q&A
Review Exercises
Day 18—Strings
Strings and Character Arrays in Java
Demo: Retrieving and Manipulating Strings
Demo: Searching and Comparing Strings
Writing Your Own String Subclass
Extracting Fields from a String
Formatting Currency
Retrieving Pairs of Values from a String
Summary
Q&A
Review Exercises
Day 19—Stream I/O
Input Stream Classes
Output Stream Classes
Stream Interfaces
Reading a File and Displaying the File’s Contents
Copying Files
Summary
Q&A
Exercises
Day 20—ActiveX
What is ActiveX?
Object Linking and Embedding
Component Object Model
ActiveX
ActiveX Applications and Components
Using ActiveX Controls with Visual J++
Installing the Controls
Using Other Controls
Summary
Q&A
Exercises
Day 21—J/Direct
A Quick Look at J/Direct
Creating Classes with J/Direct
Displaying a MessageBox Through a Windows API Call
J/Direct Options
Data Marshalling
Using J/Direct: Getting System Colors
Summary
Q&A
Exercises
Appendix A
Appendix B
Appendix C
Appendix D
Glossary
Index

Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.