medium.setYearReleased(((Number) yearField.getValue()).intValue());
medium.setValue(((Number) valueField.getValue()).intValue() * 100);
medium.setMediumType((MediumType) typeBox.getSelectedItem());
Collection<Label> labels=LabelFacade.findByName(labelField.getText());
Label label;
if (labels==null || labels.size()==0) {
label=new Label();
label.setName(labelField.getText());
} else if (labels.size()==1) {
label=labels.iterator().next();
} else {
throw new UnsupportedOperationException("There ought to popup a list");
}