QUOTE(cmoney12051 @ 8 May, 2009 - 05:32 PM)

ok thanks for that, i got the menu bar working, and am working on the line thickness. how would i go about making an eraser? thanks
you have to store independantly the data of what you have to draw
erasing is simply updating what as to be drawn and call repaint()
the same way if another window occludes yours. When the other window will be iconified your paint() method will be called and you have to be able to redraw everything that need to be drawn (not erased and erased parts)
This is a lot of work... if you have a draw rectangle feature the user can draw a rectangle and you can feel like saving the data: there is a rectangle at X,Y width = height =
Then the user earse part of the rectangle... the rectangle is NOT a rectangle anymore.. it is now a bunch of lines or even pixels
Easiest way is to have an array of pixels the size of your screen and to optimize the way you repaint them... not pixel by pixels :-)
This post has been edited by pbl: 8 May, 2009 - 05:42 PM