code: private JPanel getButtonPanel() {
      if (buttonPanel == null) {
        buttonPanel = new JPanel();
        buttonPanel.setLayout(new GridBagLayout());
  
        GridBagConstraints c1 = new GridBagConstraints();
        c1.anchor = GridBagConstraints.EAST;
        c1.gridx = 0;
        c1.gridy = 0;
        c1.weightx = 1.0D;
        c1.insets = new Insets(5, 5, 5, 5);
        buttonPanel.add(getOkButton(), c1);
  
        GridBagConstraints c2 = new GridBagConstraints();
        c2.gridx = 1;
        c2.gridy = 0;
        c2.weightx = 0.0D;
        c2.insets = new Insets(5, 5, 5, 5);
        buttonPanel.add(getCancelButton(), c2);
      }
      return buttonPanel;
    }
docs: This method initializes buttonPanel
  
  @return javax.swing.JPanel