A little unexpectedly, BoxLayout will stretch the separator. However, this dirty hack will help:
JSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);
separator.setMaximumSize( new Dimension(Integer.MAX_VALUE, 1) );
mergeBox.add(separator);