connect points to get shape outline

I'm working on a magic wand tool. I can identify the points on the edge of an image. However, I cant' find a way to connect all those points to form the shape outline.

I tried to use 'GeneralPath' to append each point but what I got was a filled shape not the outline of the shape. I think that I would need an algorithm to correctly append the points by always joining the points near each other. Does anyone know how to do this ?

[449 byte] By [jdevp3a] at [2007-11-27 8:09:34]
# 1
Polygon does this defaultedly... see awt.PolygonThat's what I'd do.and then Graphics2D.drawPolygonas opposed to FillPolygon
taifunbrowsera at 2007-7-12 19:52:41 > top of Java-index,Security,Cryptography...