Java Language: For this project, you will create a GUI drawing application. Note
ID: 3695370 • Letter: J
Question
Java Language:
For this project, you will create a GUI drawing application.
Note that there is code for a sample drawing application in the textbook. You might use that as a reference, but the requirements for this assignment are different.
Your drawing application should function as follows:
*The user can select from three different pen colors.(1st, 2nd, 3rd choice)
*The user can also select an "eraser" pen to clean the drawing.(4th choice)
*another choice for a diffecrent size of pen.(5th choice)
When the user clicks in the drawing space, the pen is activated. The user can then move the mouse to draw. The user clicks again to de-activate the pen.
Note: the user does not click-and-drag to draw. Instead, it's: a) click once to turn on, b) move to draw, c) click once to turn off.
Make sure you test that your program works when you change the color of the pen!
There is a clear button that clears the entire drawing space.
You need to keep track of both the location and color of a point which the user has drawn.To do this, use an ArrayList.
What kind of object should the ArrayList hold? Does Java provide a class that represents a Point with Color? If not, what can you do?
Design an object-oriented solution to keep track of an object with a location and a color.
Do not use double-buffering or the BasicStroke class. Instead, use the approach of keeping track of points instead. (We don't cover double-buffering or BasicStroke in our course, so if you don't know what this is, don't worry about it!)
Thank you!
Explanation / Answer
this is the concept of drawing application. see eraser portion.do the pen portion from yourself.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.