if (referenceGroupsJComboBox.getSelectedIndex() == 0) {
editReferencesJButton.setEnabled(false);
} else if (referenceGroupsJComboBox.getSelectedIndex() == referenceGroupsJComboBox.getItemCount() - 1) {
editReferencesJButton.setEnabled(false);
referenceGroupsJComboBox.setSelectedIndex(0);
new NewReferenceGroupDialog(this, true);
} else {
editReferencesJButton.setEnabled(true);
}
validateInput();