Book Description

About the Author

Table of Contents

Source Code

Send Comments

Author's Homepage
 

Object-Oriented Software Development Using Java
Xiaoping Jia, Ph.D
Chapter 7:
Design Case Study: A Drawing Pad

Objectives
In this chapter, we present a case study in developing graphical user interfaces (GUI) using the Java Foundation Classes (JFC). We also demonstrate the iterative development process by designing and implementing a graphical drawing pad in successive increments. Two new design patterns, Factory Method and State, are introduced. 


Contents
7.1 Iterative Development
7.2 Iteration 1: A Simple Scribbling Pad
7.3 Iteration 2: The Control Panel
7.4 Iteration 3: The Drawing Tools
7.5 Iteration 4: More Tools
      7.5.1 Handling The Keyboard Input
      7.5.2 Drawing Filled Shapes



Get the source code and compile

  • Get all the source files in this chapter (JAR format) 
  • Compile:
    • javac *.java
    Iteration 1: A Simple Scribbling Pad
  • Run the Scribble Pad as an application
    • java Scribble
  • Run the Scribble Pad as an applet using the appletviewer
  • Iteration 2: The Control Panel
  • Run the Scribble Pad 2 as an application
    • java Scribble2
  • Run the Scribble Pad 2 as an applet using the appletviewer

  • Iteration 3: The Drawing Tools

  • Run the Drawing Pad as an application
    • java DrawingPad
  • Run the Drawing Pad as an applet using the appletviewer
  • Iteration 4: More Tools
  • Run the Drawing Pad 2 as an application
    • java DrawingPad2
  • Run the Drawing Pad 2 as an applet using the appletviewer



  • Other Chapters

    Book Description - About the Author - Table of Contents
    Source Code - Send Comments - Author's Homepage

    Webmaster: rpasenko@shrike.depaul.edu