Home : Course Map : Chapter 6
Chapter 6: Basic Graphics
JavaTech
Course Map

Introduction
AWT
Swing
Containers
  Demo 1
UI Components
  Demo 2
UI Layout
  Demo 3   Demo 4
Text Display
  Demo 5
Drawing
  Demo 6   Demo 7
Draw Polygons
  Demo 8   Demo 9
Colors
Text Draw 
  Demo 10
Images
  Demo 11
Exercises

    Supplements
AWT
  Demo 1
Drawing
  Demo 2
Text Drawing
  Demo 3
UI Components
  Demo 4

Java2D
Shapes & Areas
  Demo 1   Demo 2
Stroke & Paint
  Demo 3
Transforms
  Demo 4
Gradients&Textures
  Demo 5   Demo 6
Text
  Demo 7   Demo 8
     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

This chapter looks at a range of practical techniques for building programs.

Java

Supplements:

Tech

  • Java Tech Graphics - overview of graphics in technical programs and what Java offers to this area.

  • Building a plotting package - we will start here to develop several graphics classes in the next few chapters that we can use for data plotting in the programs in the rest of the course.

    The demo program here will use the abstract class PlotPanel that extends JPanel and provides a frame with title, horizontal label and scale values for the axes. The subclass DemoPanel draws data points within the frame provided by methods in PlotPanel. The class PlotFormat uses the DecimalFormat class to format the axes scale numbers.

  • Drawing Panel - Polymorphism in action - the DrawPanel class takes advantage of polymorphic techniques to overlay drawings made by instances of DrawFunction subclasses.

  • Histogram Display - use a histogram to illustrate the display of data on a JPanel component. The demo applet uses a HistPanel component class that we will use in subsequent programs.

    This component also takes advantage of the formatting techniques discussed in Chapter 5: Tech for the display of the values on the coordinate axes. See the PlotFormat class. A Histogram class provides various methods for access to and modification of the histogram parameters and data.

  • Exercises - expand on the demo programs.

Physics

Latest update Feb.28.04

            Tech
Java Tech Graphics
Starting to Plot
  Demo 1
Drawing Panel
  Demo 2
Histogram Display

  Demo 3
Exercises

           Physics
Display Text Data
  Demo 1
Plot Data
  Demo 2
Find Max/Min
  Demo 3
Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.