public void disableOkButton(){
  okButton.setEnabled(false);
}

public void disableOkButton ( ) { okButton . setEnabled ( false ) ; }
disables the ok button if certain constraints of the dialog have not be fulfilled .
