private void drawCircleEndpoint(Point from,Point to,Graphics g){
  int diameter=12 + (int)getStrokeWidth();
  double a=to.x - from.x;
  double b=from.y - to.y;
  double theta=Math.atan2(b,a);
  int xminus=(int)(Math.cos(theta) * diameter / 2);
  int yplus=(int)(Math.sin(theta) * diameter / 2);
  g.fillOval(to.x - xminus - diameter / 2,to.y + yplus - diameter / 2,diameter,diameter);
  Color c=g.getColor();
  g.setColor(Color.white);
  g.fillOval(to.x - xminus - diameter / 4 - 1,to.y + yplus - diameter / 4 - 1,(int)(diameter / 1.4),(int)(diameter / 1.4));
  g.setColor(c);
}

private void drawCircleEndpoint ( Point from , Point to , Graphics g ) { int diameter = 12 + ( int ) getStrokeWidth ( ) ; double a = to . x - from . x ; double b = from . y - to . y ; double theta = Math . atan2 ( b , a ) ; int xminus = ( int ) ( Math . cos ( theta ) * diameter / 2 ) ; int yplus = ( int ) ( Math . sin ( theta ) * diameter / 2 ) ; g . fillOval ( to . x - xminus - diameter / 2 , to . y + yplus - diameter / 2 , diameter , diameter ) ; Color c = g . getColor ( ) ; g . setColor ( Color . white ) ; g . fillOval ( to . x - xminus - diameter / 4 - 1 , to . y + yplus - diameter / 4 - 1 , ( int ) ( diameter / 1.4 ) , ( int ) ( diameter / 1.4 ) ) ; g . setColor ( c ) ; }
draws a circle endpoint at the ' to ' point angled as if coming from the ' from ' point .
