internet.com logo The Java Boutique

 Java News
 Latest Applets
 Applet Categories
 Applet Index
 Applet Help
 Submit Applets
 Other Resources
 How-To Java
 Java Reviews
 Java FAQs
 Java Forum
 Java IDEs
To Webdeveloper.com
 Mecklermedia
 Internet.com
 Magazines
 Trade Shows
 Advertise
 Corporate
 Information
 Search
 Subscribe

internet.com
BrowserWatch
CyberAtlas
E-Commerce Guide
IntranetDesignMag
InternetNews.com
InternetProductWatch
InternetShopper
Internet World
JavaBoutique
JavaScript Source
JustSMIL
PCWebopaedia.com
ScriptSearch
SearchEngineWatch
ServerWatch
Stroud's CWSApps
The List
The WDVL
WebCompare.com
WebDeveloper.com
WebReference.com


How-To Java

Java2D: An Introduction and Tutorial

by Marty Hall


This tutorial presents a quick introduction to the basics of Java2D and the use of the Graphics2D class in Java 1.2. It is not a tutorial on general Java programming, a tutorial on all of Java 1.2, or even a tutorial on programming with Swing or JFC. (However, many such tutorials are available.)

JHU/APL Logo This tutorial was prepared by Marty Hall for work in the Research and Technology Development Center of the Johns Hopkins University Applied Physics Lab, for courses in the Johns Hopkins Part-Time MS Program in Computer Science, and for various industry seminars and courses.

© 1998 Marty Hall. Java 1.2beta4 version.


Table of Contents

1. Introduction
1.1 Overview
1.2 Main New Features
1.3 General Approach
2. Drawing Shapes
2.1 Overview
2.2 Shape Classes
2.3 Drawing Shapes: Example Code
2.4 Drawing Shapes: Example Output
3. Paint Styles
3.1 Overview
3.2 Paint Classes
3.3 Transparency
3.4 Gradient Fills: Example Code
3.5 Gradient Fills: Example Output
3.6 Tiled Images: Overview
3.7 Tiled Images: Example Code
3.8 Tiled Images: Example Output
4. Transparency
4.1 Overview
4.2 Transparency: Example Code
4.3 Transparency: Example Output
5. Using Local Fonts
5.1 Overview
5.2 Listing Available Fonts: Example Code
5.3 Drawing with Local Fonts: Example Code
5.4 Drawing with Local Fonts: Example Output
6. Stroke Styles
6.1 Overview
6.2 Stroke Attributes
6.3 Stroke Thickness: Example Code
6.4 Stroke Thickness: Example Output
6.5 Dashed Lines: Example Code
6.6 Dashed Lines: Example Output
6.7 Line Cap and Join Styles: Example Code
6.8 Line Cap and Join Styles: Example Output
7. Coordinate Transformations
7.1 Overview
7.2 Translations and Rotations: Example Code
7.3 Translations and Rotations: Example Output
7.4 Shear Transformations
7.5 Shear Transformations: Example Code
7.6 Shear Transformations: Example Output

[Move on to the next part of the article]

This article first appeared in November, 1998


Copyright 2002 INT Media Group, Incorporated. All Rights Reserved.
Legal Notices,  Licensing, Reprints, & Permissions,  Privacy Policy.
http://www.internet.com/