public boolean mouseUp(Event e, int x, int y)
  {
    cVertexList listCur;
    if (!regime.equals(POLY2) || (regime.equals(POLY2) && firstpoly)) 
      listCur = list;
    else
      listCur = list2;

    if(regime.equals(CHAIN) && aToMove && found)
    {
      if (!myChain.Solven(x, y)) {
	frame=new MesgFrame("Message Frame", "Hand out of reach!");
        frame.resize(400, 100);
        frame.show();
      }
      repaint();
    }
    
    if(toMove && found)
    {
      //the last position of mouse, final position for the moving vertex 
      listCur.ResetVertex( movingV, x, y);
      repaint();		  
    }
    return true;
  }