Here I'm giving you the code written in the constructor of my JFrame . I've used BorderLayout.CENTER
to put my JPanel in the center of JFrame but it's not working.
public FrameExamine() {
initComponents();
PanelExamine panelExamine=new PanelExamine();
setLayout(new BorderLayout());
getContentPane().add(panelExamine , BorderLayout.CENTER);
// pack();
setVisible(true);
}