I am making a drawing program, and have a few question with regards to that.
I'll need the user to have the choice of drawing a rectangle, an oval and a line. I suppose I need to make a super class they all derive from. Should I make this an interface or an abstract class? And how would I set up that all the shapes have some default values when they are created, like the colour etc.
The user will use the mouse to click on the screen, and the program should make the shape with center where the user click, and use previously inputted height and length to draw it. What is the easiest way to store points gathered in the frame, and do I even need to store this information?
I also would like the user to have the option to scale the shape he has just drawn, by dragging the sides. How can I most easily set this up?
Edit: Cheers. I will try with a somewhat light-weigth MVC. I have a class DrawingModel and DrawingPanel which I instantiate in View, and then pass the DrawingModel object to the DrawingPanel object through a setModel method. One question however arises, which I can't get my head around; what part of the program will have to take care of the listeners? I suppose have to be implemented by View, but where do I place the ActionListeners?