p.setBooleanValue(TABBED_TRACK, tabbedTrackCheckBox.isSelected());
    public void savePreferences() {        Preferences p = Preferences.getInstance();        p.setIntValue(LOCOMOTIVE_CONTROLES, locomotiveControlNumberModel            .getNumber().intValue());        p.setIntValue(SWITCH_CONTROLES, switchControlNumberModel.getNumber()            .intValue());        p.setStringValue(KEYBOARD_LAYOUT, keyBoardLayoutComboBox            .getSelectedItem().toString());        p.setIntValue(ACTIVATION_TIME, defaultActivationTimeModel.getNumber()            .intValue());        p.setIntValue(ROUTING_DELAY, defaultRoutingDelayModel.getNumber()            .intValue());        p.setIntValue(LOCK_DURATION, defaultLockDurationModel.getNumber()            .intValue());        p.setBooleanValue(INTERFACE_6051, interface6051.isSelected());        p.setBooleanValue(LOGGING, writeLog.isSelected());        p.setBooleanValue(FULLSCREEN, fullscreen.isSelected());        p.setStringValue(HOSTNAME, (String) hostnameTextField.getText());        p.setIntValue(PORT, Integer.parseInt(portnumberTextField.getText()));        p.setBooleanValue(AUTOCONNECT, autoconnectCheckBox.isSelected());    }