void addShape(Shape shape) { // Add the shape to the canvas, and set its size/position and color. // The shape is added at the top-left corner, with size 80-by-50. // Then redraw the canvas to show the newly added shape. shape.setColor(currentColor); shape.reshape(3, 3, 80, 50); shapes.add(shape); repaint(); }