code: private JButton getBtnOK() {
  		if (btnOK == null) {
  			btnOK = new JButton();
  			btnOK.setText(Constant.messages.getString("all.button.ok"));
  			btnOK.addActionListener(new java.awt.event.ActionListener() { 
  
  				@Override
  				public void actionPerformed(java.awt.event.ActionEvent e) {
  				    try {
  				    	Pattern.compile(getTxtPattern().getText());
  				    } catch (Exception e1) {
  				        // ZAP: i18n
  				        view.showWarningDialog(Constant.messages.getString("filter.replacedialog.invalidpattern"));
  				        getTxtPattern().grabFocus();
  				        return;
  				    }
  				    getTxtPattern().discardAllEdits();
  				    FilterReplaceDialog.this.dispose();
  				    exitCode = JOptionPane.OK_OPTION;
  
  				}
  			});
  
  		}
  		return btnOK;
  	}
docs: This method initializes btnOK
  
  @return javax.swing.JButton