code: private JButton getBtnOK() {
          if (btnOK == null) {
              btnOK = new JButton();
              btnOK.setName("btnOK");
              btnOK.setText(Constant.messages.getString("all.button.ok"));
              btnOK.addActionListener(new ActionListener() {
                  @Override
                  public void actionPerformed(ActionEvent e) {
  
                      try {
                          validateParam();
                          saveParam();
                          exitResult = JOptionPane.OK_OPTION;
  
                          AbstractParamDialog.this.setVisible(false);
  
                      } catch (NullPointerException ex) {
                          LOGGER.error("Failed to validate or save the panels: ", ex);
                          showSaveErrorDialog(ex.getMessage());
                      } catch (Exception ex) {
                          if (LOGGER.isDebugEnabled()) {
                              LOGGER.debug("Failed to validate or save the panels: ", ex);
                          }
                          showSaveErrorDialog(ex.getMessage());
                      }
                  }
              });
  
          }
          return btnOK;
      }
docs: This method initializes btnOK
  
  @return javax.swing.JButton