Java Unit 5: Applets and Graphics. Drawing and Filling Geometric Shapes. Java comes with more than just points and lines. Within the Graphics2D class, there are also methods for drawing rectangles, circles, and ellipses.
Drawing and Filling Geometric Shapes
An example applet of the graphical techniques covered is on our website at math.uaa.alaska.edu/~android/java/unit5. You could try compiling it yourself to see how all of this graphical wizardry works.