question: private static void drawArrowEndpoint ( Point from , Point to , Graphics g ) { double a = to . x - from . x ; double b = from . y - to . y ; double theta = Math . atan2 ( b , a ) ; int itheta = ( int ) ( ( theta * 360.0 ) / ( 2.0 * Math . PI ) + 180 ) ; g . fillArc ( to . x - 18 , to . y - 18 , 36 , 36 , itheta - 15 , 30 ) ; }
target:  Draws an arrowhead at the 'to' end of the edge.