public void mouseReleased(final MouseEvent mouseEvent){
  if (drawingWalls) {
    setWallPoint2(mouseEvent.getPoint());
    draggingPoint=null;
  }
}

public void mouseReleased ( final MouseEvent mouseEvent ) { if ( drawingWalls ) { setWallPoint2 ( mouseEvent . getPoint ( ) ) ; draggingPoint = null ; } }
task to perform when mouse button is released .
