void (final ConstantSize size, final JComboBox unitsCombo, final JSpinner spinner) { double value = size.getValue(); ConstantSize.Unit unit = size.getUnit(); @NlsSafe String item; if (unit.equals(ConstantSize.DIALOG_UNITS_X) || unit.equals(ConstantSize.DIALOG_UNITS_Y)) { item = "dlu"; } else { item = unit.abbreviation(); } unitsCombo.setSelectedItem(item); spinner.setModel(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0)); spinner.setValue(value); }