swing: Aligning JPanels in a BoxLayout
===

I have a JPanel (`panel`), the layout of which is set to BoxLayout. I also have a custom class `MapRow`, which extends JPanel (and has a few components inside it in a simple FlowLayout), and I wish to add the instances of `MapRow` to `panel` in a simple, left-aligned, top-down fashion. Consider the following method:

    public void drawMappingsPanel(JPanel panel) {
    		panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
    				
    		int s = /* aMethodCall() */;
    		for (int i = 0; i < s; i++) {
    			MapRow row = new MapRow();
    			row.setAlignmentX(LEFT_ALIGNMENT);
    			panel.add(row);
    		}
    	}

However, when I run the code, all `MapRow` panels are centrally aligned, like below:

![enter image description here][1]

How can I align the `MapRow` panels to the left? The `setAlignmentX(LEFT_ALIGNMENT)` method doesn't seem to work...

  [1]: http://i.stack.imgur.com/MQLWP.png