a simple interactive paint application

Assignment 4
The goal of this assignment is to gain exposure to Java Swing and to build a user interface with a mix of standard and custom widgets. This project will involve creating a simple interactive paint application.

1. [10] Write a Java application that opens a UI window (hint: see the JFrame class).

2. [40] Add a canvas to your window which draws points when the user clicks the canvas or drags the mouse on the canvas (hint: see the JPanel class). In parts 3 and 4 you’ll add buttons to customize the current point color and size, so you’ll need to store this information along with the coordinates for each point (hint: consider creating a class to hold this data).

3. [20] Add at least four buttons to your window which allow the user to select the current point color. This point color should affect any points drawn from the time the color is selected until the time that another color is selected.

4. [20] Add at least three buttons to your window which will allow the user to select the current point size. This point size should affect any points drawn from the time the size is selected until the time that another size is selected.

5. [10] Add a clear button to your frame which, when clicked, immediately clears anything that has been drawn to your canvas. Your window should look something like: Zip the Assignment5 folder in your Eclipse workspace directory and upload the .zip file to Blackboard (see Assignment 5 link in the Assignments area).
Powered by