Hello.
I am making a drawing program, using the Graphics 2D objects (lines, rectangles and ovals, namely) by placing them on a panel. With that in mind, I have 2 questions:
1) How can I store the images currently portrayed on the panel as PNG, JPG or similar file onto disk?
2) I have added a drag function. How can I implement a function so that one can see the "outline" of the rectangle, line or oval, before it is actually put onto the canvas (but not placing the outline on the canvas after the mouse button has been released)? I can't see that any of the MouseListener methods can do such a thing.