rectangles.add(rect);
if (rect != null) rectangles.add(rect);
	public void mouseReleased(MouseEvent evt) {		if (dragging == false)			return;		dragging = false;		g.dispose();		g = null;		rectangles.add(rect);		rect = null;	}