Fix width in Rectangle class. Add createMouseAdapter method.