Use javax.swing.Component constants when assigning to xLayoutAlignment.