container.setLayout(new BoxLayout(container,
BoxLayout.Y_AXIS));
RectangleArea rectangleArea = new RectangleArea(this);
container.add(rectangleArea);
label = new JLabel("Click within the framed area.");
container.add(label);
//Align the left edges of the components.
rectangleArea.setAlignmentX(LEFT_ALIGNMENT);
label.setAlignmentX(LEFT_ALIGNMENT); //unnecessary, but doesn't hurt