ComboBoxModel<DegreeFormat> degreeFormatModel = new DefaultComboBoxModel<>(new DegreeFormat[]{
Degrees, Degrees_Minutes, Degrees_Minutes_Seconds
});
degreeFormatModel.setSelectedItem(r.getUnitSystemModel().getDegreeFormat());
comboBoxDegreeFormat.setModel(degreeFormatModel);
comboBoxDegreeFormat.setRenderer(new DegreeFormatListCellRenderer());
comboBoxDegreeFormat.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() != SELECTED)
return;
DegreeFormat degreeFormat = DegreeFormat.class.cast(e.getItem());