Polygon(like classical Paint)

Hi I need an idea of making a polygon in a paint program. My program has other features like drawing rectangles, ovals etc. I was wondering if i could draw polygon just like the classical paint software where the user enters the starting co-ordinates and ending co-ordinates for the first line. Then the user enters only enters the ending co-ordinates. I think this can be done using g.drawLine(x1,y1,x2,y2); but i need a good idea to do it. Can anybody tell me where do i put the starting points to be ending points(mouseUp or mouseDown or mouseDrag methods). And what other things I could do? Any ideas will be greatly appreciated. Thanx!!!

[649 byte] By [Taufiqa] at [2007-10-3 8:30:12]
# 1
The best thing to do is just use the standard library. The JDK already provides this functionality.
paulcwa at 2007-7-15 3:37:12 > top of Java-index,Java Essentials,New To Java...