String path = "path_to_image";
JPanel panel = new JPanel(new BorderLayout());
JLabel label = new JLabel(new ImageIcon(path));
label.setHorizontalAlignment(JLabel.CENTER);
panel.add(label); // default center section
If you do not want the label to expand to fill the center section you can try
JPanel panel = new JPanel(new GridBagLayout());
panel.add(label, new GridBagConstraints());