Additional graphical classes
In Java 2, there have been many improvements in the graphics capabilities,
Graphics2D class, classes to represent
shapes, easier and more powerful image processing, .... Advanced imaging and
3-D are also being added to Java.
Drawing on a JPanel
To draw, subclass JPanel, and write a
for it. Call
repaint() from outside the
method whenever something has changed and the panel has to be redrawn.
repaint from within the
method or your programs will crash with infinite recursion or produce some