Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Java2D : A Complete Guide

Share this post!
 Vote this!

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

 Overview

In 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. more...

0 comments:

Post a Comment