void () { boolean passCountApplicable = true; if (myInstanceFiltersCheckBox.isSelected() || myClassFiltersCheckBox.isSelected()) { passCountApplicable = false; } myPassCountCheckbox.setEnabled(passCountApplicable); boolean passCountSelected = myPassCountCheckbox.isSelected(); myInstanceFiltersCheckBox.setEnabled(!passCountSelected); myClassFiltersCheckBox.setEnabled(!passCountSelected); myPassCountField.setEditable(myPassCountCheckbox.isSelected()); myPassCountField.setEnabled(myPassCountCheckbox.isSelected()); myInstanceFiltersField.setEnabled(myInstanceFiltersCheckBox.isSelected()); myInstanceFiltersField.getTextField().setEditable(myInstanceFiltersCheckBox.isSelected()); myClassFiltersField.setEnabled(myClassFiltersCheckBox.isSelected()); myClassFiltersField.getTextField().setEditable(myClassFiltersCheckBox.isSelected()); }