You may benefit from reading this. Its not clear what your question is because you haven't described what problem you're having, you've just described what you want to do, not what is not working or what's preventing you from doing what you want to do.
I think you're looking for an example of how to get Components (in your case a CaptionPanel, BFieldPanel, and BStatePanel) to align vertically using a BorderLayout. Since I don't have the components in your example, this example shows generally how to use the border layout:
import javax.swing.*;
import java.awt.*;
public class Main {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JFrame f = new JFrame("Example");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(getPanel());
f.pack();
f.setVisible(true);
}
});
}
private static JPanel getPanel() {
JPanel panel = new JPanel(new BorderLayout());
panel.add(new JLabel("Top"), BorderLayout.NORTH);
panel.add(new JLabel("Center"), BorderLayout.CENTER);
panel.add(new JLabel("Bottom"), BorderLayout.SOUTH);
panel.setPreferredSize(new Dimension(400, 300));
return panel;
}
}