I'm creating a drawingprogram using awt components and I've made it possible to draw filled and nonfilled rectangles, nonfilled rectangles and to erase an area by drawing a rectangle, all by using the Graphics object that is associated with the canvas object that I use. To be able to redraw the picture if needed, I am using a linked list to store the shapes in. I'm using a linked list because I don't know any other datastructure. But soon I'll learn more about datastructures in school...
Now to my problem...
I want to be able to draw and erase by freehand using "brushes" of different size, how do I make this possible.
I just wanted to know what method(s) I must call to be able to DRAW by freehand, in other word, I wish to color the pixles where the mouse is. If I need to get a hold of the whole pixle matrix of the canvas, then how do I do this?
Yes you can, but you'll have to do it in the implementation. You could make a dialog where the user can change the color of almost any component and all text. Thanks, Patrik