JVM Languages
j2d.txt
Associated article: The Java 2D API
Tags: JVM Languages
Published source code accompanying the article by Bill Loeb in which he discusses the Java 2D API, a set of functions that is a much more flexible and full-featured rendering package than previous versions of the Abstract Windowing Toolkit (AWT). It provides enhanced graphics, text, and image handling, supports color definition and composition, and is extensible.
The Java 2D API
by Bill Loeb
Listing One
import java.awt.*;
import java.awt.event.*;
public class TooDee extends Canvas {
public TooDee() {
setBackground(Color.white);
}
public void paint(Graphics g) {
g.setColor(Color.blue);
g.drawRect(100,100,100,100);
}
public static void ...


