| ★ wanayoo — archive 1999 http://javaboutique.internet.com/tutorials/Java2D-Tutorial_2.html | Nouvelle recherche | Portail wanayoo |
|
![]()
Java2D: An Introduction and Tutorialby Marty HallTable of Contents 1. Introduction to Java2D1.1 OverviewIn Java 1.2, the paintComponent method is supplied with a Graphics2D object (a subclass of Graphics), which contains a much richer set of drawing operations. It includes pen widths, dashed lines, image and gradient color fill patterns, the use of arbitrary local fonts, a floating point coordinate system, and a number of coordinate transformation operations. However, to maintain compatibility with Swing as used in Java 1.1, the declared type of the paintComponent argument is Graphics, so you have to cast it to Graphics2D before using it.1.2 Main New Features
1.3 General Approach
[Move on to the next part of the article] This article first appeared in October, 1998
Copyright 1998 Mecklermedia Corporation. |